Logout users from OIDC provider when logging out of the app

This commit is contained in:
Maurus Decimus
2026-04-23 13:57:27 +02:00
parent 27ba55fbf6
commit 47fcf1fe08
5 changed files with 53 additions and 6 deletions
+8 -2
View File
@@ -35,7 +35,7 @@ export default function OAuthCallback() {
throw new Error(t('oauth.missingParams', 'Missing authorization code or state parameter'));
}
const { codeVerifier, tokenEndpoint, state, returnUrl } = getStoredOAuthData();
const { codeVerifier, tokenEndpoint, state, returnUrl, endSessionEndpoint } = getStoredOAuthData();
if (!state || state !== stateParam) {
throw new Error(t('oauth.stateMismatch', 'State parameter mismatch. Please try logging in again.'));
@@ -50,7 +50,13 @@ export default function OAuthCallback() {
useAuthStore
.getState()
.setTokens(tokenResponse.access_token, tokenResponse.refresh_token, tokenResponse.expires_in, tokenEndpoint);
.setTokens(
tokenResponse.access_token,
tokenResponse.refresh_token,
tokenResponse.expires_in,
tokenEndpoint,
endSessionEndpoint,
);
clearStoredOAuthData();