Why do I get a 419 | Page Expired when logging in to Nova on my staging enviroment?
I'm running Nova locally and it's turning out to be a great solution. I have an annoying issue that I can't seem to figure out.
When I ship to my staging environment and try to login I get a 419 | Page expired message however if I use a different browser than the one I'm using locally, login works just fine. I'm assuming this has something to do with sessions?
How can I make sure there isn't a conflict with session when running the same browser from local to staging?
Does same happen if you login staging first, then local second. But if cache / cookies are cleared it should work correct. I suspect somehow a cookie isn't cleared.
419 means one thing -> Somethings wrong with CSRF token. Here are pretty much most of the common steps to take in order to make sure that everything's fine:
Change session cookie name to be different for each environment in config/session.php (Through .env)
Mismatched or missing token means -> The session expired(which isnt the case here), the token wasn't included in the form, or the session storage isn't working properly. So next step would be to check the session storage. Memcached can be difficult to work with in Nova.
Make sure the SESSION_DOMAIN is set in .env (For the staging at least, local it should be null)