Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jerauf's avatar

TokenMismatchException in VerifyCsrfToken.php line 68

I've seen many posts around the web about this but none of the solutions have worked. I have a new installation of Laravel and am putting a site back up. When I add only my views, my own controllers, etc (not adding any packages or doing anything but adding database credentials) I get the above token mismatch error. When I try logging in in incognito mode in Chrome, it just refreshes the login page.

I've tried commenting out the CRSF line in kernel.php and changing the write permissions to the sessions folder. People seem to be saying to put the CRSF meta tag in the head and the hidden field in the form quite a bit. That's already included when you create the authentication with artisan. So that doesn't really help.

Nothing is working. Has anyone had this trouble?

0 likes
2 replies
Snapey's avatar

sounds like sessions are not created. if you are using file based sessions, look for the file being created in the storage/framework folder

jerauf's avatar

I thought of that. And there are files being created there.

Please or to participate in this conversation.