Fix OIDC logout not redirecting back to app

Pass id_token_hint explicitly to signoutRedirect() so Authentik
honors the post_logout_redirect_uri and sends users back to the app.
This commit is contained in:
Viktor Barzin 2026-02-08 00:29:02 +00:00
parent e5ce8c1201
commit a7fa9b81cf
No known key found for this signature in database
GPG key ID: 0EB088298288D958

View file

@ -15,7 +15,10 @@ export const login = async (): Promise<void> => {
export const logout = async (): Promise<void> => {
try {
await userManager.signoutRedirect();
const user = await userManager.getUser();
await userManager.signoutRedirect({
id_token_hint: user?.id_token,
});
} catch (error) {
console.error('Logout redirect failed:', error);
throw parseOidcError(error);