• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Overriding Session Expiration?

#3
(03-07-2019, 02:33 AM)muuucho Wrote: Ion_Auth comes with "Remember me" functionality. You can limit the time to be remembered in the config file ion_auth.php

http://benedmunds.com/ion_auth/
Thanks for letting me know about this! Unfortunately it looks like they're doing this by setting their own, separate cookie with a separate table (or table fields) to handle what is essentially an additional session cookie, which is a bit disappointing, as it means essentially implementing my own parallel session cookies.
I've been looking more at the problem and one other possible alternative might be to set CodeIgniter's session cookies to something sufficiently high (e.g- a month, with regeneration enabled), then if the user doesn't ask to be remembered, set an earlier expiration time in the user data. This means I'll still need to add some kind of code to all controllers (via inheritance) to check this expiration time, so that sessions that have expired this way can be cleared and redirected to a login page.
It's still not ideal though, as really what I want to do is have the cookie expire on close by default, and set a time if the user asks to be remembered. Both options involve a lot of working around CodeIgniter's session class.
Are there any other alternative ways to do this?
Reply


Messages In This Thread
Overriding Session Expiration? - by Haravikk - 03-06-2019, 04:01 AM
RE: Overriding Session Expiration? - by muuucho - 03-07-2019, 02:33 AM
RE: Overriding Session Expiration? - by Haravikk - 03-07-2019, 03:10 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.