Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

2FA whitelist #874

Open
lchojnacki opened this issue Mar 29, 2022 · 1 comment
Open

2FA whitelist #874

lchojnacki opened this issue Mar 29, 2022 · 1 comment

Comments

@lchojnacki
Copy link

lchojnacki commented Mar 29, 2022

In our application, we would like to disable 2FA for certain IP addresses (located in the corporate network). It seems to me that this is impossible with the current implementation of 2FA in flask-security.

It seems to me that it would require adding another setting (SECURITY_TWO_FACTOR_IP_WHITELIST?) and updating this condition:

flask_security/views.py:164

if cv("TWO_FACTOR"):

to check whether the IP address of the request is on the whitelist.

What do you think?

@jwag956
Copy link
Collaborator

jwag956 commented May 20, 2022

Missed this - 2FA is implemented in flask-security-too - to which I believe you should direct this question:
https://github.com/Flask-Middleware/flask-security/discussions

and yes - it would require a new feature/configuration variable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants