django-trench
django-trench copied to clipboard
:sparkles: Adds HOTP MFA code support
Resolves #204. ~~Resolves #205.~~
Adds support for counter based 2fa codes for all 2fa methods except app/yubi key.
- HOTP codes are guaranteed to be unique by incrementing a counter each time a code is generated
- Consequently generating a new code invalidates the previously generated code
- Storing a timestamp on code generation allows us to use validity windows
- Clearing the timestamp on successful verify invalidates the current code so it can't be used again
To switch to HOTP based codes simply override the default message dispatcher used in the trench settings.
Action Items:
- [x] Correctly generate migrations? I ran
python manage.py makemigrationsfrom inside the test project - ~~Regenerate documentation?~~
Hi, Very interesting PR, do you need any help to get this merged ? Thanks.
@izimobil someone with merge access on this repo would have to do it. It's been a while since I've looked at this PR/repo though so it might need some updates before then as well.
You can always fork this repo and merge this PR there if you need these changes.