From e9575843b7fbdb3f62e72f8f1d381d04c7c2eab4 Mon Sep 17 00:00:00 2001 From: ashokkhurana Date: Tue, 2 Aug 2016 18:04:49 -0700 Subject: [PATCH] Change to call handleWindowCallback from adalContext handleWindowCallback was the odd one out and causing issue when redirected back to the authenticated page. The page redirect stops and shows id_token appended to redirect url. Calling the handleWindowCallback from adalContext will do the complete redirect to user's home page after reading relevant information from id_token hash. --- src/services/adal.service.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/services/adal.service.ts b/src/services/adal.service.ts index f643b77..da76a63 100644 --- a/src/services/adal.service.ts +++ b/src/services/adal.service.ts @@ -58,15 +58,7 @@ export class AdalService { } public handleWindowCallback(): void { - let hash = window.location.hash; - if (this.adalContext.isCallback(hash)) { - let requestInfo = this.adalContext.getRequestInfo(hash); - this.adalContext.saveTokenFromHash(requestInfo); - if (requestInfo.requestType === this.adalContext.REQUEST_TYPE.LOGIN) { - this.updateDataFromCache(this.adalContext.config.loginResource); - } else if (requestInfo.requestType === this.adalContext.REQUEST_TYPE.RENEW_TOKEN) { - } - } + this.adalContext.handleWindowCallback(); } public getCachedToken(resource: string): string {