diff --git a/src/Squidex/app/shared/services/auth.service.ts b/src/Squidex/app/shared/services/auth.service.ts index b3230b599..e63718f5e 100644 --- a/src/Squidex/app/shared/services/auth.service.ts +++ b/src/Squidex/app/shared/services/auth.service.ts @@ -98,11 +98,7 @@ export class AuthService { } else if (this.loginCache) { return this.loginCache; } else { - this.loginCache = - this.checkState(this.userManager.signinSilent()) - .then(result => { - return result || this.checkState(this.userManager.signinSilent()); - }); + this.loginCache = this.checkState(this.userManager.signinSilent()); return this.loginCache; } @@ -125,11 +121,7 @@ export class AuthService { } public loginPopup(): Observable { - const promise = - this.checkState(this.userManager.signinPopup()) - .then(result => { - return result || this.checkState(this.userManager.signinSilent()); - }); + const promise = this.checkState(this.userManager.signinPopup()); return Observable.fromPromise(promise); }