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

@burmudar burmudar force-pushed the wb/add-oauth-device-flow branch from fd1668e to 1565618 Compare January 23, 2026 09:03
@burmudar burmudar force-pushed the wb/add-oauth-refresh-token branch from 2f24f44 to 7f2c665 Compare January 23, 2026 09:03
@burmudar burmudar force-pushed the wb/add-oauth-device-flow branch from 1565618 to 9a04958 Compare January 23, 2026 09:10
@burmudar burmudar force-pushed the wb/add-oauth-refresh-token branch from 7f2c665 to 87b5732 Compare January 23, 2026 09:10
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