From 0b9b7444ebd3e2bf6de4fa783288d3f66e7059c3 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Wed, 24 Jun 2020 15:26:02 +0300 Subject: [PATCH] fix: angular2-oauth-oidc logout error --- .../packages/core/src/lib/services/auth.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts index 0c38b22acf..35f667bf20 100644 --- a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts @@ -20,14 +20,14 @@ export class AuthService { private oAuthService: OAuthService, private store: Store, @Optional() @Inject('ACCOUNT_OPTIONS') private options: any, - ) {} - - login(username: string, password: string): Observable { - const tenant = this.store.selectSnapshot(SessionState.getTenant); - + ) { this.oAuthService.configure( this.store.selectSnapshot(ConfigState.getOne('environment')).oAuthConfig, ); + } + + login(username: string, password: string): Observable { + const tenant = this.store.selectSnapshot(SessionState.getTenant); return from(this.oAuthService.loadDiscoveryDocument()).pipe( switchMap(() => @@ -63,7 +63,7 @@ export class AuthService { ) .pipe( switchMap(() => { - this.oAuthService.logOut(); + this.oAuthService.logOut(true); return this.store.dispatch(new GetAppConfiguration()); }), );