Answer the question
In order to leave comments, you need to log in
Why does 419 error occur when cross-domain authorization in laravel?
Hello! Installed laravel 5.7.2, rolled up basic authorization (make:auth), made migration. At this stage, everything is working correctly.
Then I registered SESSION_DOMAIN=.localhost in the config - I started getting an error:
419 Sorry, your session has expired. Please refresh and try again.
Answer the question
In order to leave comments, you need to log in
I found the answer myself. Oddly enough, it didn’t start on the localhost, but everything worked on the real domain.
Specified as follows:
SESSION_DRIVER=database
SESSION_DOMAIN=.site.ru
Then you need to reset all caches, both server and browser. And clear ALL cookies, including subdomain cookies.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question