Skip to content

RememberMeBadge in remember Me Functionality  #16149

Closed
@avieville

Description

@avieville

Hello,

I followed the documentation to set up the remember me functionality and the remember me cookie is not created during authentication if in addition I do not add 'new RememberMeBadge ()' in the authenticate function of the AppCustomAuthenticator .

public function authenticate(Request $request): PassportInterface
{
    $email = $request->request->get('email', '');

    $request->getSession()->set(Security::LAST_USERNAME, $email);

    return new Passport(
        new UserBadge($email),
        new PasswordCredentials($request->request->get('password', '')),
        [
            new CsrfTokenBadge('authenticate', $request->request->get('_csrf_token')),
            new RememberMeBadge()
        ]
    );
}

thank you for your feedback and your actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Securityhelp wantedIssues and PRs which are looking for volunteers to complete them.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions