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

Is there a reason the built in 'remember me' functionality doesn't work?

0

Well, I assumed it was working as intended - ie, when the PHP session times out, instead of presenting you with the login screen, it uses the remember_token to keep you logged in, albeit under a new session. I thought that it would be expected that session vars set in the first session would be lost in subsequent sessions. Is this not the case?

Docs on the remember functionality seem pretty thin. Has this been covered in detail elsewhere?

0

I am not sure about the longevity of session vars. I only use them for 1-2 page loads before expiring them.

The best way to find out if they stay persistent would be to check the code for the remember me functionality. Most likely in here somewhere, https://github.com/laravel/framework/tree/4.2/src/Illuminate/Session.

Sorry I don't have a more definitive answer, I've never tried to use states to remember information for more than a few minutes.

0

Thanks for the response. To be completely honest, I could easily refactor to use the cache as opposed to session. Given that I'm actually looking for this semi-temporary data to stored across sessions, that's probably the best way to do it!

Thanks

0

Sign in to participate in this thread!

Eventy

Your banner here too?

opb opb Joined 31 Jan 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.