diff --git a/core/app/service/auth.go b/core/app/service/auth.go
index 726ab4bb1..1ecf5c651 100644
--- a/core/app/service/auth.go
+++ b/core/app/service/auth.go
@@ -37,7 +37,7 @@ func (u *AuthService) Login(c *gin.Context, info dto.Login, entrance string) (*d
return nil, "", buserr.New("ErrRecordNotFound")
}
if nameSetting.Value != info.Name {
- return nil, "ErrAuth", nil
+ return nil, "ErrAuth", buserr.New("ErrAuth")
}
if err = checkPassword(info.Password); err != nil {
return nil, "ErrAuth", err
@@ -47,7 +47,7 @@ func (u *AuthService) Login(c *gin.Context, info dto.Login, entrance string) (*d
return nil, "", err
}
if len(entranceSetting.Value) != 0 && entranceSetting.Value != entrance {
- return nil, "ErrEntrance", nil
+ return nil, "ErrEntrance", buserr.New("ErrEntrance")
}
mfa, err := settingRepo.Get(repo.WithByKey("MFAStatus"))
if err != nil {
diff --git a/frontend/src/views/log/login/index.vue b/frontend/src/views/log/login/index.vue
index 7ad3427cd..9e1b6bd07 100644
--- a/frontend/src/views/log/login/index.vue
+++ b/frontend/src/views/log/login/index.vue
@@ -27,7 +27,10 @@
-
+