check refresh token expiration (fixed logic)

This commit is contained in:
mqf20 2025-01-26 23:25:07 +08:00
parent 82b1b70535
commit d7edd64efc
No known key found for this signature in database

View file

@ -615,7 +615,7 @@ func (s *Storage) renewRefreshToken(currentRefreshToken string) (string, string,
break
}
}
if refreshToken.Expiration.After(time.Now()) {
if refreshToken.Expiration.Before(time.Now()) {
return "", "", fmt.Errorf("expired refresh token")
}
// creates a new refresh token based on the current one