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

Config: Refresh Token Request with Custom Parameters #521

Open
zs-codex opened this issue Oct 1, 2021 · 2 comments
Open

Config: Refresh Token Request with Custom Parameters #521

zs-codex opened this issue Oct 1, 2021 · 2 comments

Comments

@zs-codex
Copy link

zs-codex commented Oct 1, 2021

We'd like to be able to add custom parameters to the Refresh Token Request provided by the configuration client.

Specifically, we need a way to add the redirect_uri parameter to the refresh request:

curl -X POST \
  https://api.dexcom.com/v2/oauth2/token \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'client_secret={your_client_secret}&client_id={your_client_id}&refresh_token={your_refresh_token}&grant_type=refresh_token&redirect_uri={your_redirect_uri}'

The auth server returns an error if redirect_uri is missing. This is required by Dexcom but is general enough to support many other use cases.

@shawnhwei
Copy link

This is also required by recent Gitlab versions.

@andig
Copy link
Contributor

andig commented Jul 23, 2023

The token refresh is handled by the RefreshTokenSource. How would an API look like that is able to supply additional headers? Are these the same headers as during initial token retrieval? If yes this might potentially be done using a http.Transport.

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

No branches or pull requests

3 participants