fix: handle mfa and entrance auth errors (#12222)

This commit is contained in:
ssongliu
2026-03-19 15:11:37 +08:00
committed by GitHub
parent 7f799004c3
commit 5bf6d17451
+1 -1
View File
@@ -94,7 +94,7 @@ func (b *BaseApi) MFALogin(c *gin.Context) {
user, msgKey, err := authService.MFALogin(c, req, string(entrance))
go saveLoginLogs(c, wrapLoginErr(msgKey, err))
if msgKey == "ErrAuth" {
if msgKey == "ErrAuth" || msgKey == "ErrMFA" {
helper.BadAuth(c, msgKey, err)
return
}