Skip to content

Commit

Permalink
Fix B2C signout (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichdeJong authored Oct 17, 2023
1 parent 762bcc9 commit 6e947bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/routing/aadSignoutRouteGuard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ export class AadSignOutRouteGuard implements RouteGuard {
return true;
}

const auth = `https://${config.authority}/tfp/${config.signinTenant}/${config.signinPolicyName}`;

const msalConfig = {
auth: {
clientId: config.clientId,
authority: auth,
knownAuthorities: [config.authority],
postLogoutRedirectUri: location.origin
}
};
Expand All @@ -47,8 +51,8 @@ export class AadSignOutRouteGuard implements RouteGuard {

this.authenticator.clearAccessToken();
msalInstance.logoutPopup({
postLogoutRedirectUri: location.origin,
mainWindowRedirectUri: location.origin
postLogoutRedirectUri: location.origin + "/",
mainWindowRedirectUri: location.origin + "/"
}); // actual sign-out from AAD/B2C

return false; // explicitly stopping route execution.
Expand Down

0 comments on commit 6e947bf

Please sign in to comment.