-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[core, identity] examine our token refresh logic and code to ensure consistency with other languages #29608
Labels
Comments
xirzec
added a commit
that referenced
this issue
May 13, 2024
### Packages impacted by this PR `core-rest-pipeline` `ts-http-runtime` ### Issues associated with this PR #29608 ### Describe the problem that is addressed by this PR When debugging a recent issue from Storage, it was reported that in the case of the tokenCycler being unable to retrieve a new access token from a CAE challenge, it would fall back to delaying for the maximum lifetime of the current (invalid) access token instead of failing immediately. This change improves the robustness of this scenario by invaliding the existing cached token when claims are received. ### Are there test cases added in this PR? _(If not, why?)_ Yes, I added a test and confirmed it was timing out before the fix was added.
Fixed via #29638 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a token cycler that handles access token refresh
azure-sdk-for-js/sdk/core/core-rest-pipeline/src/util/tokenCycler.ts
Line 56 in 25942d3
There's also concern that under some condition, the while loop could potentially be running for a long time
azure-sdk-for-js/sdk/core/core-rest-pipeline/src/util/tokenCycler.ts
Lines 84 to 88 in 25942d3
/cc @schaabs
The text was updated successfully, but these errors were encountered: