Repository navigation
fix: use silentRequestTimeoutInSeconds for the refresh token grant - #2479
Open
basitalisandhu wants to merge 1 commit into
Open
basitalisandhu wants to merge 1 commit into
basitalisandhu wants to merge 1 commit into
Conversation
signinSilent() passed timeoutInSeconds: undefined to _useRefreshToken when the caller gave no timeout, and the spread overwrote the default from the settings, so the refresh grant had no timeout at all (SilentRenewService always calls signinSilent() without args). Fixes authts#2478
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes/fixes #2478
When the stored user has a refresh token and
signinSilent()is called withoutsilentRequestTimeoutInSeconds(which is howSilentRenewServicecalls it),_useRefreshTokengottimeoutInSeconds: undefinedfrom the args, and the spread overwrote the settings default. The refresh request then ran with no timeout, so a token endpoint that never answers left the renew pending andmaxSilentRenewTimeoutRetriesnever kicked in.I moved the default after the spread so an explicit value still wins. Added two tests (settings value used, args value preferred); the first one fails on main with
timeoutInSeconds: undefined.npm test(574 passed) andnpm run lintare clean.Checklist