Hi
I am facing a 419 Page Expired problem. I've tried many solutions out there without any luck. I cleared all cache items, I've changed the session_driver and still the same problem.
Any idea where I should be looking?
The problem happens when submitting the login form. The @csrf exists. The Login page hosts a LoginView written in Vue.js and passes as a slot the @csrf token. The token is correctly generated and I can see it inside DevTools.
@bilalhaidar It has nothing to do with the same_site config setting.
419 is a HTTP error when the CSRF token is not present in the request, or has a stale value. If you’re using Vue, Laravel should automatically include the CSRF token by parsing it from your HTML page’s meta tag. So check that the page that has the JavaScript, also has the following meta tag:
What is the value of SESSION_SECURE_COOKIE in your .env file? It can also be set in config/session.php. If this is set to true, then you must login via a HTTPS url. Otherwise you get a 419 as well.
I am using Chrome. I also tried on Safari same issue.
This is happening with my current setup using Docker. I am not sure if there should be any special handling for laravel hosted on Docker. Although it was working fine on Friday. Suddenly, it stopped working!
If so, check that your browser is receiving session cookie.
you can see these in your browser dev tools. Clear the cookies that are there then refresh the page
If you dont see any cookie being sent then you need to check all files that you have edited since it last worked. Somewhere you will have a php file where <?php are not exactly the first characters
If you dont see any cookie being sent then you need to check all files that you have edited since it last worked. Somewhere you will have a php file where <?php are not exactly the first characters