Search code examples
adal

cordova-plugin-ms-adal issues with chrome version 83+


I encountered some issues with cordova-plugin-ms-adal after the latest google chrome update (83), i assume the issues comes from the OOR-CORS update which they made on the chrome webview. When i call app.authContext.acquireTokenAsync(resourceUrl, appId, redirectUrl), the promise is never resolved and i think that the response from Azure AAD is blocked somewhere.
I don't see any errors related to CORS and i also can't find how to update my app in order to be OOR-CORS compliant.
Anyone is experiencing the same issue? (any chrome under 83 works as expected).


Updated:

enter image description here

enter image description here

enter image description here

enter image description here

The thing that is refreshing is the create context method which will be called twice, one time when i enter the page and second time when i'm refreshing the same page. (This fixes the adal blocked response)

When i'm calling the app.authContext.acquireTokenAsync it will never receive any response from AD until i do the first page reload, after that it will always work as expected.


Solution

  • In order to identify the issue, I would suggest you to look at the networks calls made with a chrome browser under 83 and compare it with chrome browser 83. The aim is to look for any difference in the response returned due to CORS headers etc. This might help you identify what has changed due to which promise is not resolved.

    Since there is no CORS error being shown in console, I expect the response of the api is affected due to CORS implementation.

    Another suggestion is to use adal-for-js (link) instead of adal-for-cordava (link) as the later is depcreated and not maintained any more. Any bug fixes which could affect newer browser would require you to patch it directly which could be cumbersome effort, IMO.