Skip to content

CurrentUser::$absoluteAuthTimeout logic is not compatible with auto-login cookie #112

@jettero777

Description

@jettero777

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions