mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
fix cancel MFA: the secret needs to be reset too
This commit is contained in:
parent
f46f2fd7f6
commit
b51ed259b4
@ -27,6 +27,7 @@ def mfa_cancel():
|
|||||||
|
|
||||||
if totp.verify(token):
|
if totp.verify(token):
|
||||||
current_user.enable_otp = False
|
current_user.enable_otp = False
|
||||||
|
current_user.otp_secret = None
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash("MFA is now disabled", "warning")
|
flash("MFA is now disabled", "warning")
|
||||||
return redirect(url_for("dashboard.index"))
|
return redirect(url_for("dashboard.index"))
|
||||||
|
Loading…
Reference in New Issue
Block a user