Skip to content

Bug fix: #198

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

Merged
merged 2 commits into from
May 24, 2024
Merged

Bug fix: #198

merged 2 commits into from
May 24, 2024

Conversation

ShocOne
Copy link
Contributor

@ShocOne ShocOne commented May 24, 2024

Change

Bug Fix Notes for PR
Issue Description:
The root cause of the issue is that the token lifetime is shorter than the buffer period set for token refresh. This causes the token to never be considered valid by the client, triggering a refresh immediately after acquiring a new token. This creates a loop where the token is continually refreshed but never actually used for requests.

Breakdown of the Issue:

Token Lifetime and Buffer Period:

The token lifetime was initially set to 60 seconds.
The buffer period for token refresh (TokenRefreshBufferPeriod) is likely greater than 60 seconds (e.g., 5 minutes by default).

Client Behavior:

When the token lifetime is less than the buffer period, the client sees the token as invalid immediately after it is acquired because it is already within the buffer period for needing a refresh.
This leads to the client continuously refreshing the token without ever considering it valid for use.
Infinite Refresh Loop:

This results in an infinite loop of token refresh attempts, which eventually fails when the maximum number of consecutive refresh attempts is reached, or when other conditions cause the client to error out.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@ShocOne ShocOne merged commit df8cee1 into main May 24, 2024
3 of 7 checks passed
@ShocOne ShocOne deleted the dev branch May 25, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant