So I'm working with a site that has "unlimited" (very long expiration time) sessions so that a user doesn't have to keep logging in all the time, however this isn't really ideal if a user uses an insecure (e.g- shared) system, as they'll stay logged in.
What I'd like to do is add a "Keep me logged in" checkbox on the login page so that I can have default behaviour with a short (or on close) expiration time, and then override that with the much longer expiration time (or the other way around, if easier).
Now I know how I'd do this if I was using PHP's session functions directly, but is there a proper way to do this with CodeIgniter's session class? Also if there is an easier way to do this on CodeIgniter 4 do let me know; I hadn't intended to upgrade just yet (too much other stuff still to get done) but I can move it forward if it will make this easier to implement.
Thanks!