Skip to content

Conversation

@burmudar
Copy link
Contributor

@burmudar burmudar commented Dec 8, 2025

add refresh to oauthdevice.Client

oauthdevice: add RefreshToken field and Refresh method

Test plan

@burmudar
Copy link
Contributor Author

burmudar commented Dec 8, 2025

Copy link
Member

@keegancsmith keegancsmith left a 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) {
Copy link
Member

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?

Copy link
Contributor Author

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

@burmudar
Copy link
Contributor Author

burmudar commented Dec 8, 2025

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.

Noopee! Def a good call out - I'll make sure to test it

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.

3 participants