Skip to content
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

Support OAuth 2.0 with bootstrapped refresh token #2448

Open
Jeffail opened this issue Mar 27, 2024 · 0 comments
Open

Support OAuth 2.0 with bootstrapped refresh token #2448

Jeffail opened this issue Mar 27, 2024 · 0 comments

Comments

@Jeffail
Copy link
Member

Jeffail commented Mar 27, 2024

In cases where a refresh token exists for an OAuth 2.0 server but the client credentials are invalid we could potentially support using the existing refresh token.

Taken from https://stackoverflow.com/questions/28685033/how-to-handle-refresh-tokens-in-golang-oauth2-client-lib :

var token oauth2.Token
token.AccessToken = {{ From config }}
token.RefreshToken = {{ From config }}
token.Expiry = {{ From config }}
token.TokenType = {{ From config }}

var conf oauth2.Config
// TODO: Build the endpoint similar to how the client credentials config does currently

return conf.Client(ctx, token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant