Skip to content

Remember me cookie auth does not work anymore with v16 #1167

@LordSimal

Description

@LordSimal

I noticed, that my users have to re-log in rather quickly compared to how they used to in the past.

The Cookie Authenticator is loaded correctly as I see it, but it does not contain the Identifiers it needs.

Adjusting the Cookie Authenticator in the Auth.Authenticators section of the users.php to

'Cookie' => [
    'className' => 'CakeDC/Auth.Cookie',
    'skipTwoFactorVerify' => true,
    'rememberMeField' => 'remember_me',
    'cookie' => [
        'expires' => new \DateTime('+1 month'),
        'httponly' => true,
    ],
    'urlChecker' => 'Authentication.CakeRouter',
    'identifier' => [
        'Authentication.Password' => [
            'fields' => [
                'username' => ['username', 'email'],
                'password' => 'password',
            ],
            'resolver' => [
                'className' => 'Authentication.Orm',
                'finder' => 'active',
            ],
        ],
    ],
],

fixes the problem as it now contains the correct password identifier

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