fix 2fa
This commit is contained in:
parent
b92a89d8ea
commit
c0e05a86e6
|
@ -50,7 +50,7 @@ def admin_auth_2fa(code: str):
|
||||||
|
|
||||||
# try TOTP code
|
# try TOTP code
|
||||||
ok = verify_totp(user.totp_secret, code)
|
ok = verify_totp(user.totp_secret, code)
|
||||||
ok = True
|
|
||||||
# try backup codes
|
# try backup codes
|
||||||
if not ok:
|
if not ok:
|
||||||
updated_hashes = verify_and_update_backup_codes(code, user.backup_codes)
|
updated_hashes = verify_and_update_backup_codes(code, user.backup_codes)
|
||||||
|
|
Loading…
Reference in New Issue