Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Called providers session value is never unset #296

@kriswillis

Description

@kriswillis

Bundle version: 4.18.1
Symfony version: 3.4.43

Description
Once prepareAuthentication() is called for the first time, the firewall/provider combination is recorded under the 2fa_called_providers session key; however, it is never removed after a successful authentication.

If you log out and back in, the 2FA form is displayed but no code is generated/sent out because prepareAuthentication() is not called again due to the presence of the 2fa_called_providers session value from the previous login.

Is the intention for the user to re-use the previous auth code?

Additional Context
I'm using a custom provider, but I don't think that makes any difference. From what I can see, the TwoFactorProviderPreparationRecorder class contains methods for checking if a provider is prepared and recording that a provider is prepared, but nothing for "un-preparing" them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions