Support the ongoing development of Laravel.io →
Authentication Session

Hi,

I have a problem when i open my website made in Laravel 4, at the same time, with two differents web browsers.

I only log with Auth::check in both of us, but in the second one, i have a tokenMismatchException.

I think it's the same problem if i use the website in two differents tabs in the same browser.

Can someone has an idea?

Last updated 2 years ago.
0

Have had similar, to clear this, first check your session.php file and ensure that for you use a unique name for your cookie, then go on ahead and clear the browser cache of previously stored cookies, then check to see whether the problem still exists.

This approach helped me deal with mine

Last updated 2 years ago.
0

Thanks for your answer. What i have to change? Here is the session.php :

'driver' => 'native',	
'payload' => 'laravel_payload',

'expire_on_close' => 'false',
'cookie' => 'laravel_session',
'lottery' => array(2, 100),
'files' => storage_path().'/sessions',
Last updated 2 years ago.
0

Thanks, i was have the same problem (im working in two differents software with laravel) and the tharoldD answer solve it!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

soclosed soclosed Joined 5 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.