From 3b43b37e5d0439d2a9875b9c63fbbdd17c37b6e3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 8 Dec 2016 00:21:43 +0100 Subject: [PATCH] Auth cleanup --- src/Squidex/app/shared/services/auth.service.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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); }