Answer the question
In order to leave comments, you need to log in
Laravel why authorization fails when refreshing a page?
If you refresh the page or just navigate through the pages of the site, then authorization may fail. There is a redirect to the /login route, if the page is updated on this route, then everything will be fine, the user will be authorized again, and this does not always work the first time, sometimes you need to refresh the page 3 times.
Laravel 5.6, standard laravel authorization. Session driver tried file and database still crashes.
Routes for authorized users use the auth and web middleware.
Answer the question
In order to leave comments, you need to log in
Check config/session.php?
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
SESSION_LIFETIME=120
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question