You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 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.
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: