fix: include BASE_PATH and ?local in OIDC post-logout redirect URI
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user