|
|
@ -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); |
|
|
} |
|
|
} |
|
|
|