[ApiAuthorization] Disables pop-up logout by default

* There is an issue in Edge that prevents it from working.
* Can be enabled by setting 'popUpDisabled = false' in 'authorize.service.ts'
This commit is contained in:
Javier Calvarro Nelson 2019-08-23 08:35:26 -07:00 committed by Doug Bunting
parent 8417429b9b
commit 61dc5fbe28
2 changed files with 8 additions and 0 deletions

View File

@ -121,6 +121,10 @@ export class AuthorizeService {
public async signOut(state: any): Promise<IAuthenticationResult> {
try {
if (this.popUpDisabled) {
throw new Error('Popup disabled. Change \'authorize.service.ts:AuthorizeService.popupDisabled\' to false to enable it.');
}
await this.ensureUserManagerInitialized();
await this.userManager.signoutPopup(this.createArguments());
this.userSubject.next(null);

View File

@ -98,6 +98,10 @@ export class AuthorizeService {
async signOut(state) {
await this.ensureUserManagerInitialized();
try {
if (this._popUpDisabled) {
throw new Error('Popup disabled. Change \'AuthorizeService.js:AuthorizeService._popupDisabled\' to false to enable it.')
}
await this.userManager.signoutPopup(this.createArguments());
this.updateState(undefined);
return this.success(state);