I get the error The page has expired due to inactivity. Please refresh and try again.
on a Laravel 5.6.39. In Chrome "Network tab" says error login - 419 unknown status
As soon as I refresh the page, I immediately get the error. So I never see the login view anymore, then I'm stuck. Think to common users that have no experience and only try to refresh the page. If it doesn't work they leave your app.
I can reproduce the error following these steps:
SESSION_LIFETIME
to 1 minute)I already read and tried the most common causes:
@csrf
is present in the login form (it's the default authentication by Laravel)storage
has 755
but tried also with 775
and 777
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan config:cache
php artisan key:generate
SESSION_DRIVER=file
but in production I also tried to replace it with SESSION_DRIVER=cookie
with SESSION_DOMAIN=https://app.my-domain.com/
Here you'll find my code (controllers, view, routes, .env, ...): https://gist.github.com/dangelion/aa7fc54ea75f7b2d6062fc79f07e04e8
I really have no more idea to solve this. Some helps? Thanks
When we update our application, a browser may still use old files. If you don’t clear your cache, Old files can access problems when you apply.
after add @csrf
in form Clear the browser cache and now hope this might work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With