Browse Source

Auth cleanup

pull/1/head
Sebastian 9 years ago
parent
commit
3b43b37e5d
  1. 12
      src/Squidex/app/shared/services/auth.service.ts

12
src/Squidex/app/shared/services/auth.service.ts

@ -98,11 +98,7 @@ export class AuthService {
} else if (this.loginCache) { } else if (this.loginCache) {
return this.loginCache; return this.loginCache;
} else { } else {
this.loginCache = this.loginCache = this.checkState(this.userManager.signinSilent());
this.checkState(this.userManager.signinSilent())
.then(result => {
return result || this.checkState(this.userManager.signinSilent());
});
return this.loginCache; return this.loginCache;
} }
@ -125,11 +121,7 @@ export class AuthService {
} }
public loginPopup(): Observable<boolean> { public loginPopup(): Observable<boolean> {
const promise = const promise = this.checkState(this.userManager.signinPopup());
this.checkState(this.userManager.signinPopup())
.then(result => {
return result || this.checkState(this.userManager.signinSilent());
});
return Observable.fromPromise(promise); return Observable.fromPromise(promise);
} }

Loading…
Cancel
Save