Closed luis-ribeiro closed 6 years ago
@luis-ribeiro Thank you for pointing out this issue. I have made a fix for it in the dev branch. The way this was previously working is when you say deferred.resolve(config) in the interceptor, it re sends the http request and then the variable tokenStored gets assigned as it is saved in the browser cache when the method is broadcasted.
Closing this issue for now. Please reopen if you face any more issues. I will add this fix as part of our next release.
Hi, not sure if this is an error or if I am not seeing all the aspects of adal.
In some cases, my authentication or request process hits this condition, where tokenStored is null, and in the following conditions authService.loginInProgress() is true.
So, from what I understood, when the login process ends, it will broadcast an event, and this function will be executed, setting the new token in the config.headers.Authorization variable.
But, it is setting the new token using the "tokenStored" variable instead if "token", that is an input argument of the function. tokenStored is null. Token variable have the correct token.
This causes the request to be performed with an invalid authorization header value.
Adal version is AdalJS v1.0.16, but in the 17 the code is the same.
Any suggestion?
Thanks, Luis Ribeiro