Search code examples
authenticationlaravel-5

Laravel 5 authentication issue with "remember"


I have a phenomenon that I do not understand about saving a session in Laravel 5.1

When my user connects by checking the "remember" box, I see the cookie "remember ..." which arrives on his computer. And when he does not check this box the cookie does not happen. See image below.

enter image description here

On the database side, the column "remember_token" is well fed.

When the same user closes his browser and relaunch the application: it works, he is well recognized.

The mechanical is working.

The problem is when he tries again later in a few hours, at the time the app recognizes no more.

My code is very standard, I do not think it's the origin of the issue.

Could this be a config problem somewhere?


Solution

  • In config/session.php find "lifetime", this is where define session lifetime, change it to what you want.