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

OAuth2: Add support for refresh tokens on Github #223

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

jirijakes
Copy link
Contributor

Github apps have optional expiration of access tokens, which leads to using refresh token to obtain new access token (and new refresh token). This patch adds support for refresh tokens on Github, which was previously missing.

Although the Github documentation specifies that client_secret is a required parameter for refreshing token, it is not required in this case for unknown reason (perhaps device flow?).

Additionally after this change, new refresh token will be used preferentially, if present in refresh token response.

Github apps have optional expiration of access tokens, which leads to
using refresh token to obtain new access token (and new refresh
token). This patch adds support for refresh tokens on Github, which
was previously missing.

Although the Github documentation specifies that 'client_secret' is a
required parameter for refreshing token, it is not required in this
case for unknown reason (perhaps device flow?).

Additionally after this change, new refresh token will be used
preferentially, if present in refresh token response.
@jdegoes jdegoes merged commit 9455483 into zio:master Jul 15, 2023
25 checks passed
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.

2 participants