-
Notifications
You must be signed in to change notification settings - Fork 70
feat(oauth): Add refresh to oauthdevice.Client #1227
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
base: wb/add-oauth-device-flow
Are you sure you want to change the base?
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
keegancsmith
left a comment
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.
did you test what happens if someone revokes src-cli and then you try refresh a token / use an old token? I'm interested to know if the error message you show users is possible to debug as that being the issue.
| } | ||
|
|
||
| // Refresh exchanges a refresh token for a new access token. | ||
| func (c *httpClient) Refresh(ctx context.Context, endpoint, refreshToken string) (*TokenResponse, error) { |
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.
does this just magically get used to refresh in our client?
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.
Not yet! There is some code I still need to land which adds a transport which will do automatic refresh if you use api.Client
Noopee! Def a good call out - I'll make sure to test it |
fd1668e to
1565618
Compare
2f24f44 to
7f2c665
Compare
1565618 to
9a04958
Compare
7f2c665 to
87b5732
Compare
add refresh to oauthdevice.Client
oauthdevice: add RefreshToken field and Refresh method
Test plan