AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 374 forks source link

if resource is empty, acquireTokenRedirect calls callback before assigning it #794

Closed alex3683 closed 5 years ago

alex3683 commented 6 years ago

In adal.js line 749ff:

 AuthenticationContext.prototype.acquireTokenRedirect = function (resource, extraQueryParameters, claims) {
        if (this._isEmpty(resource)) {
            this.warn('resource is required');
            callback('resource is required', null, 'resource is required');
            return;
        }

        var callback = this.callback;
        // ...

Here callback is called without being set, in case the resource is empty.

rohitnarula7176 commented 5 years ago

@alex3683 Thank you for pointing out this issue. I apologize for the delayed response. We will release a new version in a couple of weeks with this fix.

rohitnarula7176 commented 5 years ago

@alex3683 Closing this issue. Fixed and merged in dev.