-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
As I see from the code the CurrentUser::$absoluteAuthTimeout is stored as __auth_absolute_expire in PHP session only but not in cookie,
PHP session expires by default in 24 minutes, so usually auto-login cookie is used to keep sessions alive, but __auth_absolute_expire logic is not working as intended with the cookies:
if __auth_absolute_expire expires it ends current user session stored in PHP session but new user session will be created right away on the next request by CookieLoginMiddleware using the auto-login cookie,
or if a user takes a break for 24 minute the PHP session with __auth_absolute_expire will expire itself, and will be created fresh session with new __auth_absolute_expire on new request
so I think __auth_absolute_expire should be stored in cookie too to fix it
UPD and same for __auth_expire - it is not working as intended if auto-login cookie is used,
but I'm not sure if it does make sense to add __auth_expire to cookie as there is similar expire mechanism for cookie