Browse Source

redirect to login page instead

Son NK 5 years ago
parent
commit
837ab8258e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/auth/views/mfa.py

+ 2 - 2
app/auth/views/mfa.py

@@ -22,13 +22,13 @@ def mfa():
     # user access this page directly without passing by login page
     if not user_id:
         flash("Unknown error, redirect back to main page", "warning")
-        return redirect(url_for("dashboard.index"))
+        return redirect(url_for("auth.login"))
 
     user = User.get(user_id)
 
     if not (user and user.enable_otp):
         flash("Only user with MFA enabled should go to this page", "warning")
-        return redirect(url_for("dashboard.index"))
+        return redirect(url_for("auth.login"))
 
     otp_token_form = OtpTokenForm()
     next_url = request.args.get("next")