From c0e05a86e61123c5224f7f54e3ad14908fb161d3 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Tue, 2 Feb 2021 01:55:18 -0600 Subject: [PATCH] fix 2fa --- backend/grant/utils/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/grant/utils/admin.py b/backend/grant/utils/admin.py index 2c1cb175..5ece3053 100644 --- a/backend/grant/utils/admin.py +++ b/backend/grant/utils/admin.py @@ -50,7 +50,7 @@ def admin_auth_2fa(code: str): # try TOTP code ok = verify_totp(user.totp_secret, code) - ok = True + # try backup codes if not ok: updated_hashes = verify_and_update_backup_codes(code, user.backup_codes)