redirect to login page when user logout without token

This commit is contained in:
MaysWind
2023-04-16 02:00:59 +08:00
parent 221a7809b6
commit a96eb31dc9
6 changed files with 9 additions and 1 deletions
+4
View File
@@ -100,6 +100,10 @@ func (s *TokenService) ParseToken(c *core.Context) (*jwt.Token, *core.UserTokenC
}, request.WithClaims(claims))
if err != nil {
if err == request.ErrNoTokenInRequest {
return nil, nil, errs.ErrTokenIsEmpty
}
return nil, nil, err
}