-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Hello, when I am trying to fetch access Token in my Angular 5 application for the first time after user is logged in, with following method:
adalService.acquireToken(resource)
and I am getting this error:
AuthCallbackComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property '12345678-abcd-efgh-9876-1fa334df7c72|87654321-asdf-48b2-b9ca-111222333444' of undefined
at Adal5Service.handleWindowCallback (adal-angular5.js:77)
at LoginService.completeAuthentication (login.service.ts:80)
at AuthCallbackComponent.ngOnInit (callback.component.ts:17)
Resource is an API defined on AAD. Login service is my angular service which calls Adal5Service.handleWindowCallback function in this code, during standard, complete authentication, action:
...
public completeAuthentication(): void {
this.adalService.handleWindowCallback();
}
...
Second time Token is received without errors, but I don't want to implement retries. I would rather understand what is going wrong here. Any similar problem faced by anyone?
Thanks a lot. Vedran