tuxis-ie / nsedit

DNS Editor working with PowerDNS's new API
GNU General Public License v2.0
199 stars 55 forks source link

Session expiry problem #126

Closed richard-underwood closed 7 years ago

richard-underwood commented 7 years ago

The session expires after exactly half an hour, whether it's been active or not. It would make sense to reduce the timeout and instead extend the session each time the session is validated by a request.

It looks like this is a limitation in the PHP session functions. The best solution appears to be to set a long-lasting cookie (perhaps a session cookie with no lifetime) and then store the expiry within the session.

http://php.net/manual/en/function.session-set-cookie-params.php#12811

bjoe2k4 commented 7 years ago

Just set a $secret in config.inc.php (commented out by default) and there will be a checkbox below the login that allows you to stay logged in for a month via an autologin cookie. Works well for me.