fix: include BASE_PATH and ?local in OIDC post-logout redirect URI
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m4s
CI / docker (push) Successful in 57s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 37s

Without BASE_PATH the redirect fails behind a reverse proxy. Adding
?local prevents the SSO auto-redirect from immediately signing the
user back in after logout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-06 09:45:46 +02:00
parent 4496be08bd
commit 9a40626a27

View File

@@ -1,5 +1,6 @@
import { create } from 'zustand';
import { api } from '../api/client';
import { config } from '../config';
interface AuthState {
accessToken: string | null;
@@ -154,7 +155,7 @@ export const useAuthStore = create<AuthState>((set, get) => ({
error: null,
});
if (endSessionEndpoint && idToken) {
const postLogoutRedirect = `${window.location.origin}/login`;
const postLogoutRedirect = `${window.location.origin}${config.basePath}login?local`;
const params = new URLSearchParams({
id_token_hint: idToken,
post_logout_redirect_uri: postLogoutRedirect,