delete your sessions (this will log everyone out), new sessions will use a new xsrf token
Jul 29, 2024
4
Level 4
Deleting the old XSRF-TOKEN after changing the SESSION_DOMAIN
I recently changed SESSION_DOMAIN in my app's env file so that the session data was accessible across our subdomains.
We changed it from domain.com to .domain.com
I've got a problem now: the old domain.com XSRF-TOKEN is still present in existing user's browsers and is causing 419 errors when they try to use the platform.
How do I remove the old XSRF cookie from their browsers?
I've tried Cookie::expire('XSRF-TOKEN', '/', 'domain.com') but strangely, this is only removing the .domain.com XSRF-TOKEN, not the domain.com one.
Please or to participate in this conversation.