Fix OIDC and oAuth2 logout redirect.

This regression was introduced when implementing the oAuth2 auth
backend. As we are redirecting to an external URL, we should not use
`navigate`.
This commit is contained in:
Orne Brocaar 2024-01-12 09:03:05 +00:00
parent e1334f647d
commit 2e104dc6ef

View File

@ -57,11 +57,11 @@ function Header({ user }: { user: User }) {
if (oidc.getEnabled() && oidc.getLogoutUrl() !== "") {
SessionStore.logout(false, () => {
navigate(oidc.getLogoutUrl());
window.location.replace(oidc.getLogoutUrl());
});
} else if (oAuth2.getEnabled() && oAuth2.getLogoutUrl() !== "") {
SessionStore.logout(false, () => {
navigate(oAuth2.getLogoutUrl());
window.location.replace(oAuth2.getLogoutUrl());
});
} else {
SessionStore.logout(true, () => {