Skip to content

Commit

Permalink
fix: logout of pwa
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
Mirko Mollik committed May 4, 2024
1 parent ebc998d commit ea3af98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/holder/projects/pwa/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ export class AuthService implements AuthServiceInterface {

public async logout() {
this.oauthService.logOut();
this.router.navigateByUrl('/login');
}
public refresh() {
this.oauthService.silentRefresh();
Expand All @@ -213,6 +212,7 @@ export class AuthService implements AuthServiceInterface {
return this.oauthService.getIdToken();
}
public get logoutUrl() {
alert(this.oauthService.logoutUrl);
return this.oauthService.logoutUrl;
}
}
1 change: 1 addition & 0 deletions apps/holder/projects/pwa/src/app/authConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export const authConfig: AuthConfig = {
showDebugInformation: false, // Also requires enabling "Verbose" level in devtools
clearHashAfterLogin: false, // https://github.com/manfredsteyer/angular-oauth2-oidc/issues/457#issuecomment-431807040,
nonceStateSeparator: 'semicolon', // Real semicolon gets mangled by Duende ID Server's URI encoding
logoutUrl: `${environment.keycloakHost}/realms/${environment.keycloakRealm}/protocol/openid-connect/logout`,
};

0 comments on commit ea3af98

Please sign in to comment.