Support the ongoing development of Laravel.io →
Authentication Session
Last updated 2 years ago.
0

I don't know whats your app is about but usually clients only use one browser.

Last updated 2 years ago.
0

I don't think this is currently possible, without extending/changing the Guard class. This is done for security reasons, so that a user can't stay logged in forever.

Last updated 2 years ago.
0

It would require saving cookie on user's computer or validation via IP or something like that. That would be vulnerably, not a smart idea.

Last updated 2 years ago.
0

Cookies are always saved on the users computer ;) But to be clear, the OP doesn't want to share his session betweens browsers, he just doesn't want all 'remember me' sessions to be clear when logging out from one of them.

Last updated 2 years ago.
0

Since the remember_token is saved in the users table by default, you would have to refactor how the session is validated. Typically, this token is saved in the cookie in the browser. When the user visits, the Auth class looks at the cookie, and checks if it is found in the user table. Then logs them in automatically.

You would have to add a remember_token table probably with a one user to many remember_token relationship. Then each user that checks the remember me could create multiple tokens. You would need to make sure you take care of garbage collection on older sessions.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

pfbernardo pfbernardo Joined 31 Mar 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.

© 2024 Laravel.io - All rights reserved.