-
Notifications
You must be signed in to change notification settings - Fork 219
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
allow to optionally pass redirect_uri into exchangeRefreshToken #1291
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1291 +/- ##
==========================================
- Coverage 78.43% 78.42% -0.02%
==========================================
Files 45 45
Lines 1730 1729 -1
Branches 343 343
==========================================
- Hits 1357 1356 -1
Misses 336 336
Partials 37 37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
… refresh token as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I downloaded this branch to my local and referenced it in two of my React apps. After some testing I can say that this is working as expected. I added a sigininSilent()
call, which contained my redirect_uri
, to the addAccessTokenExpiring
event. Once it fired the redirect_uri
appeared in the token renewal payload which properly refreshed my current token. I consider this change approved.
Example:
useEffect(() => {
return auth.events.addAccessTokenExpiring(() => {
auth.signinSilent(
{
redirect_uri: import.meta.env.VITE_B2C_REDIRECT_URI ?? ''
}
);
});
}, [auth.events, auth.signinSilent]);
thanks for testing |
@pamapa when do you think this will be available? Thanks for you're work on this |
I plan do make a 3.0.0-rc.0 release this week. |
Closes/fixes #1175
Removes the
resource
prop from the state and adds it into the args to pass down to theexchangeRefreshToken
function. Treatresource
,extraTokenParams
andredirect_uri
and any future prop the same way.Checklist