Skip to content

The 'two_factor_enabled_providers_for_user' filter behaves differently in version 0.16.0 #871

@sirolf

Description

@sirolf

Describe the bug

Hi,

Prior to version 0.16.0, we used the two_factor_enabled_providers_for_user filter to programmatically disable all providers for a specific user when they accessed the site from our company IP address.

After updating to version 0.16.0, this behavior seems to have changed. When the provider list is empty, the plugin now automatically enables email as a provider.

Would it be possible to add either:

  • an extra filter to explicitly allow an empty provider list, or
  • an IP whitelist filter to support this use case?

Regards,
Floris Jansen

Steps to Reproduce

Update to version 0.16.0

Screenshots, screen recording, code snippet

No response

Environment information

No response

Please confirm that you have searched existing issues in this repository.

Yes

Please confirm that you have tested with all plugins deactivated except Two-Factor.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions