浏览代码

redirect to login page instead

Son NK 5 年之前
父节点
当前提交
837ab8258e
共有 1 个文件被更改,包括 2 次插入2 次删除
  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")