diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts index 79a0978a..5cd359f6 100644 --- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts @@ -157,6 +157,7 @@ export class Effects { tap(authed => { // this.ngZone.run(() => { // location.href = this.router.parseUrl('/account/login').toString(); + this.protocolService.disconnect(); this.router.navigate(['/account/login']); this.appAuthenticationService.logout(); this.store.dispatch(logoutInitialize()); @@ -173,7 +174,6 @@ export class Effects { switchMap(action => { return this.authenticationProtocolService.logout({}).pipe( map(res => { - this.protocolService.disconnect(); this.store.dispatch(loginRedirect()); }), catchError(error => of(error)) @@ -266,7 +266,7 @@ export class Effects { } } - if (loginInfo.initPw) { + if (!!loginInfo.initPw) { this.store.dispatch(logout()); const passwordInitStep1Url = this.piService.passwordInitStep1Url({