Missing Origin Header #392
-
Upon looking the codes, I was wondering if there's any way to specify additional headers aside from the default ones? Advance thanks for the insights. :) oauth2.py I can't find a way for the headers parameter to be supplied from the outside. Btw, I'm using the available python code for Flask. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
We do not expose additional headers as parameter in MSAL's API surface. Why would you want to do so? Can you describe your scenario first, before we start discussing the implementation, so that we avoid the XY problem? BTW, what did you mean by "using the available python code for Flask"? Are you using any of our flask-based samples? If so, please also leave its link so that we know specifically which one. UPDATE: Future readers can skip the lengthy conversation and just head to the final solution here. |
Beta Was this translation helpful? Give feedback.
-
(The following content was buried deep down here in the lengthy conversation, and we copied it here for visibility.) ... I can reproduce your "AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests" error, if I deliberately configure my web app as a SPA app (and also skipping its CLIENT_SECRET in my app implementation) - but those were the wrong way to configure/use a web app. If this was indeed your configuration, I'd suggest you to delete the SPA section, and configure your app as a Web app (or a Desktop app, for that matter). Or you could still have your SPA configuration and your Web/Desktop app configuration co-exist, as long as their redirect_uri are different than each other. |
Beta Was this translation helpful? Give feedback.
(The following content was buried deep down here in the lengthy conversation, and we copied it here for visibility.)
... I can reproduce your "AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests" error, if I deliberately configure my web app as a SPA app (and also skipping its CLIENT_SECRET in my app implementation) - but those were the wrong way to configure/use a web app.
If this was indeed your configuration, I'd suggest you to delete the SPA section, and configure your app as a Web app (or a Desktop app, for that matter). Or you could still have your SPA configuration and your Web/Desktop app configuration co-exist,…