-
-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addstatictoken
from Django-OTP doesn't always work with BackupView etc.
#145
Comments
Having thought about this some more, I'm wondering why D2FA views only look for a single StaticDevice - is there actually a use-case where a user would have backup and not-backup tokens? |
The name field of Ideally, Either way, if D2FA wants to be in a position for |
Good thoughts @psagers, that sounds like good improvements. Thanks for the advice on how to improve this package. |
I'm not saying it's a good idea and I'm not suggesting we should support it, but a lot a banks still provide printed TAN lists to use for e.g. online banking. These codes are static 2FA codes but are not backup codes in case you loose a device, afaict. |
This is partly a bug with Django-OTP. See this PR
If the specified user has already generated backup tokens (and thus has a StaticDevice), then
addstatictoken
will behave as expected - the user gets a new backup token.However, if the user didn't previously, the command will create a StaticDevice with the name "Backup Code". Django Two-Factor Authentication has the name "backup" hardcoded into all its views and so never sees the newly created token.
tl;dr: D2FA and Django-OTP have hardcoded different names for backup tokens.
The text was updated successfully, but these errors were encountered: