Replies: 2 comments 1 reply
-
Bit of context: It's a Node.js express app that is serving an SPA. SPA is making a fetch request to The Web App and the SPA in on the same domain. The App in AD is registered as a Web App. And the Would appreciate any input. |
Beta Was this translation helpful? Give feedback.
-
Redirecting to fetch/XHR request to AAD is not the correct approach. Instead, your API should return an error, and then your app should perform a separate redirect to AAD to authorize the user, and then retry the request when that is completed. |
Beta Was this translation helpful? Give feedback.
-
I would like to understand why I do get CORS errors when using the
getToken
middleware from ExpressTestApp sample.microsoft-authentication-library-for-js/samples/msal-node-samples/ExpressTestApp/src/AuthProvider.ts
Line 261 in c2bd423
When the
InteractionRequiredAuthError
is thrown it should initiate the interactive flow but it gets blocked.Sign in, sing out, silent acquisition of token works just fine.
Beta Was this translation helpful? Give feedback.
All reactions