diff --git a/mfa/templates/MFA.html b/mfa/templates/MFA.html index 7a4d396..8ef7a94 100644 --- a/mfa/templates/MFA.html +++ b/mfa/templates/MFA.html @@ -103,6 +103,7 @@ {% endif %} {% endfor %} + {% if "RECOVERY" not in UNALLOWED_AUTHEN_METHODS %} RECOVERY @@ -113,6 +114,7 @@ On + {% endif %} {% else %} You didn't have any keys yet. {% endif %} diff --git a/mfa/totp.py b/mfa/totp.py index 32adf2e..42a5de6 100644 --- a/mfa/totp.py +++ b/mfa/totp.py @@ -55,7 +55,7 @@ def auth(request): return login(request) elif tokenLength == 10 and "RECOVERY" not in settings.MFA_UNALLOWED_METHODS: #Backup code check - resBackup=recovery.verify_login(request.session["base_username"], token=request.POST["otp"]) + resBackup=recovery.verify_login(request, request.session["base_username"], token=request.POST["otp"]) if resBackup[0]: mfa = {"verified": True, "method": "RECOVERY","id":resBackup[1]} if getattr(settings, "MFA_RECHECK", False):