-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Create new token when current has expired #10435
Conversation
🦋 Changeset detectedLatest commit: 939667a The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!preview token-renewal |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
!preview token-renewal |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
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.
LGTM! One comment as a recommendation about how to simplify the logic and improve the error case for the user
369de59
to
f443f44
Compare
!preview token-renewal |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
Hey @FredKSchott, I'm not sure I can properly test this. The previous code would only fail if:
Does this sound right? If so I'm included just to test that this branch is working past the |
The previous code would fail and continue to attempt retries as long as the |
Changes
ttl
returned from the service to get anexpires
date.expires
tells us if the token is completely expired and cannot be renewed, in which case we fetch a new token instead.Testing
Docs