-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ionic background not working with msal interceptor #7365
Comments
You can provide your own implementation of the |
Thank you very much for your help! Now, I have implemented this class for managing requests:
But it returns the following error: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests. Do you know what i can do? |
Your POST request is likely missing the origin header. I'd suggest confirming and, if so, make sure to include it |
Now, I add 'Origin' http://localhost:3000' and it works!!
Is it a configuration problem maybe? |
Your redirectUri page is attempting a navigation. Recommended best practice for silent/popup calls is to use a blank page that runs no javascript as your redirectUri page to avoid these types of problems. If that's not possible, you'll need to debug your redirectUri page and see if you can locate where it's attempting a redirect or change to the url |
Finally, we have made a custom solution, in which we manually use localstorage to only renew the token after a certain amount of time. Thank you very much for your help |
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.24.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
3.0.23
Public or Confidential Client?
Public
Description
I'm using Ionic, and when I turn off the screen, the interceptor's http calls stop working, and the reason seems to be because angular-common-http is being used.
We have created a custom interceptor to use capacitorHttp, but the acquireTokenSilent method is still using angular-common-http internally, so it still blocks the call
Is there a way to make acquireTokenSilent use capacitorHttp instead of angular-common-http?
Error Message
No response
MSAL Logs
No response
Network Trace (Preferrably Fiddler)
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Expected Behavior
should continue renewing token, but it doesn't
Identity Provider
Azure B2C Custom Policy
Browsers Affected (Select all that apply)
Other
Regression
No response
Source
External (Customer)
The text was updated successfully, but these errors were encountered: