Invalidate user session with provider on logout

This commit is contained in:
2024-10-03 14:00:43 +01:00
parent 6cd06831f0
commit a7d42de0a4
4 changed files with 67 additions and 17 deletions
+5
View File
@@ -106,6 +106,11 @@ func (t *TraefikOidc) handleLogout(rw http.ResponseWriter, req *http.Request) {
}
if idToken, ok := session.Values["id_token"].(string); ok {
err := t.RevokeTokenWithProvider(idToken)
if err != nil {
handleError(rw, "Failed to revoke token", http.StatusInternalServerError, t.logger)
return
}
t.RevokeToken(idToken)
}