Add options to control autologin cookie lifetime and refresh function

This commit is contained in:
Kijin Sung 2023-08-29 23:42:01 +09:00
parent 87300c9944
commit 4af7354bf0
7 changed files with 24 additions and 2 deletions

View file

@ -1149,7 +1149,8 @@ class Session
{
// Get session parameters.
list($lifetime, $refresh_interval, $domain, $path, $secure, $httponly, $samesite) = self::_getParams();
$lifetime = time() + (86400 * 365);
$lifetime_days = config('session.autologin_lifetime') ?: 365;
$lifetime = time() + (86400 * $lifetime_days);
// Set the autologin keys.
if ($autologin_key && $security_key)