-
Notifications
You must be signed in to change notification settings - Fork 973
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
Azure Active Directory refresh access token #1675
Azure Active Directory refresh access token #1675
Conversation
Initial tests indicates that access token is being successfully renewed. @dthyresson, please make a review and merge at your convenience. /cc @dac09 @AndrewLamYW |
@jeliasson won't this refresh the token every time getToken is called? Is there a way to determine if the token has expired first then do the fetch? |
@dac09 I was wondering the same so I began reading
So, it checks if it is the cache first, and if not will request it.
And that's what @jeliasson is doing --
So, while I cannot test, this seems to be implemented according to the docs. In fact, this is the same as Auth0's https://github.com/redwoodjs/redwood/blob/main/packages/auth/src/authClients/auth0.ts#L36 https://auth0.github.io/auth0-spa-js/classes/auth0client.html#gettokensilently |
@dac09 From my initial tests it will grab the cached token (
@dthyresson If you'd like, I can bring in this PR build to a new PR in |
@jeliasson I say we merge, I am actually updating So, this will get in when that happens (hopefully in the next day or so). |
Addressing a fix for #1672 using
acquireTokenSilent
to obtain access token and handle the renewal.https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-acquire-token?tabs=javascript