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

younus's avatar

High occurrence of TokenMismatchException

I deployed a Laravel 5.1 app to production and I get a LOT of token mismatch exception from my users. I think the user behaviour is 1. Login & Use the app. 2. Logout. Once they log out, their mobile browser continues to have the page opened. So when reopen their browser, they have the logout page. While logging in back, they trigger a token mismatch exception. (Logout page is the login page with a message indicating that the user has successfully logged out). Is there any way to handle this use case? Is disabling the csrf token in the login page the only option?

0 likes
2 replies

Please or to participate in this conversation.