添加 auth_alone_otp 开关

This commit is contained in:
bjdgyc
2024-11-07 16:32:48 +08:00
parent c7d6a76759
commit 9ef29545bc
7 changed files with 141 additions and 143 deletions

View File

@@ -118,7 +118,7 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
return
}
// 用户otp验证
if !v.DisableOtp {
if base.Cfg.AuthAloneOtp && !v.DisableOtp {
lockManager.LoginStatus.Store(loginStatusKey, true) // 重置OTP验证计数
sessionID, err := GenerateSessionID()
if err != nil {