Skip to content

Commit

Permalink
chore: comment out post logout uri until it is registered in hydra
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienne-deriv committed Feb 7, 2025
1 parent 6fd4baf commit af7d319
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/oidc/oidc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,15 @@ export const OAuth2Logout = async (options: OAuth2LogoutOptions) => {
const oidcEndpoints = localStorage.getItem('config.oidc_endpoints') || '{}';

let logoutUrl = getOAuthLogoutUrl() || JSON.parse(oidcEndpoints).end_session_endpoint;
const userManager = await createUserManager({
redirectCallbackUri: options.redirectCallbackUri,
postLogoutRedirectUri: options.postLogoutRedirectUri,
});
const userState = await userManager.getUser();
if (userState?.id_token) {
logoutUrl += `?id_token_hint=${userState.id_token}&post_logout_redirect_uri=${options.postLogoutRedirectUri}`;
}
// NOTE: Comment this out once front channel is implemented
// const userManager = await createUserManager({
// redirectCallbackUri: options.redirectCallbackUri,
// postLogoutRedirectUri: options.postLogoutRedirectUri,
// });
// const userState = await userManager.getUser();
// if (userState?.id_token) {
// logoutUrl += `?id_token_hint=${userState.id_token}&post_logout_redirect_uri=${options.postLogoutRedirectUri}`;
// }

const cleanup = () => {
const iframe = document.getElementById('logout-iframe') as HTMLIFrameElement;
Expand Down

0 comments on commit af7d319

Please sign in to comment.