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

ThanhPv's avatar

TokenMismatch When login without artisan server

Hi, When I use Nginx to login it return TokenMismatchException but It works fine with Artisan Server.

Could anyone please give me some hints?

0 likes
3 replies
Lke's avatar

Hi,

I Think its a normal behavior, because you are switching between artisan and Nginx.

The token logic stores the token in your "session or cookies i dont remeber" on your client side. Try to run your nginx virtual host. Start a new anon browser session and try to log-in.

Greatings.

ThanhPv's avatar

I am hitting the case that login token mismatch happen occasionally. Refreshing login page can temporarily resolve problem. I am using laravel 5.4

Please or to participate in this conversation.