Browse Source

fix: angular2-oauth-oidc logout error

pull/4485/head
mehmet-erim 6 years ago
parent
commit
0b9b7444eb
  1. 12
      npm/ng-packs/packages/core/src/lib/services/auth.service.ts

12
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<any> {
const tenant = this.store.selectSnapshot(SessionState.getTenant);
) {
this.oAuthService.configure(
this.store.selectSnapshot(ConfigState.getOne('environment')).oAuthConfig,
);
}
login(username: string, password: string): Observable<any> {
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());
}),
);

Loading…
Cancel
Save