0
votes

In the Azure B2C documentation you have this information about silently acquiring new access tokens when the previous one expired.

ID tokens and access tokens both expire after a short period of time. Your app must be prepared to refresh these tokens periodically. To refresh either type of token, perform the same hidden iframe request we used in an earlier example, by using the prompt=none parameter to control Azure AD steps. To receive a new id_token value, be sure to use response_type=id_token and scope=openid, and a nonce parameter.

Is there a way to do this without an iFrame?

1
Please let us know which library you are using MSAL or ADAL?Sruthi J

1 Answers

0
votes

You can do it with a full redirect by calling acquireTokenReditect() with MSAL. There is no other option in a javascript app. This of course is not going to be a good UX as you’d need to do it every time the api resource changes or scope changes.