Pri Nce
Pri Nce

Reputation: 711

Facing 419 | Page Expired even if CSRF present in the form

Description:

Facing a CSRF issue when I deployed my project on a VPS server. Here is the video: https://www.loom.com/share/e2cd2c7ae2f6490ab1717d3243592513

Here is my form ![image](https://user-images.githubusercontent.com/43857625/113865389-d7d3bd80-97cd-11eb-83f5-db427a826598.png)

I have no idea why I am facing this.

Here is my application: https://tukhulu.com/login https://tukhulu.com/register

Please help

Steps To Reproduce:

Upvotes: 0

Views: 75

Answers (1)

SBTHDR
SBTHDR

Reputation: 36

Try to clear all cache items

php artisan view:clear 
php artisan route:clear
php artisan cache:clear
php artisan config:cache

try changed the session_driver

if your project is running on server add SESSION_DOMAIN=yourdomain.com in your .env file or in your config/session.php 'domain' => env('SESSION_DOMAIN', 'yourdomain.com'), then run

php artisan cache:clear

maybe switch between 'secure' => env('SESSION_SECURE_COOKIE', false), and 'secure' => env('SESSION_SECURE_COOKIE', true), in your config/session.php

Upvotes: 1

Related Questions