clear session when refresh token fail to generate a new acess token

This commit is contained in:
Anderson Valério 2024-12-27 08:38:23 -03:00
parent 2851483446
commit 6cf267d368
No known key found for this signature in database
GPG Key ID: 92D38E56BFF005A0
1 changed files with 1 additions and 0 deletions

View File

@ -191,6 +191,7 @@ func (s *storedSessionLoader) refreshSessionIfNeeded(rw http.ResponseWriter, req
// If a preemptive refresh fails, we still keep the session
// if validateSession succeeds.
logger.Errorf("Unable to refresh session: %v", err)
return fmt.Errorf("unable to refresh session: %v", err)
}
// Validate all sessions after any Redeem/Refresh operation (fail or success)