🐛 Fix cannot refresh token
This commit is contained in:
parent
e5641b8068
commit
902650f11d
@ -148,7 +148,7 @@ func RefreshToken(token string) (string, string, error) {
|
||||
} else if claims.Type != JwtRefreshType {
|
||||
return "404", "403", fmt.Errorf("invalid token type, expected refresh token")
|
||||
} else if err := database.C.Where(models.AuthSession{
|
||||
BaseModel: models.BaseModel{ID: uint(parseInt(claims.Subject))},
|
||||
BaseModel: models.BaseModel{ID: uint(parseInt(claims.SessionID))},
|
||||
}).First(&session).Error; err != nil {
|
||||
return "404", "403", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user