Repository navigation
github: parse comma-separated OAuth scopes - #2505
Merged
Merged
Conversation
GitHub returns granted OAuth scopes as a comma-separated value in the token response, which deviates from RFC 6749 section 3.3 which calls for a space-delimited format. Parse GitHub's response using its own format so GCM preserves the scopes granted to the user. Note that real-world testing shows that GitHub accepts either of space or comma-separated scopes for the 'scope' request parameter/field, so we don't need to change our request logic, only the response handling. Signed-off-by: Matthew John Cheetham <[email protected]>
mjcheetham
force-pushed
the
gh-oauth-scope
branch
from
November 10, 2026 12:49
157f80d to
a41a042
Compare
dscho
approved these changes
Nov 10, 2026
dscho
left a comment
Contributor
There was a problem hiding this comment.
Makes sense. Just one suggestion, below.
Merged
mjcheetham
added a commit
that referenced
this pull request
Nov 23, 2026
Next week is Git 2.98-rc0, so let's cut our release ahead of that for some extra testing, and to give the Git for Windows project time to incorporate the new GCM bits into their release. **Changes:** - Support instance path prefixes for Gitea in generic OAuth #2479 - Detect GitHub Enterprise Data Residency instances ('Proxima') #2498 - Correctly parse returned GitHub OAuth scopes (#2505) - Fix several OAuth client spec deviations (#2499) - Fix `diagnose` command unit tests (#2501) - Install from source fixes (#2502, #2506) - Fix to release tarballs on Mac and Linux (#2491) - CI task updates (#2496)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub returns granted OAuth scopes as a comma-separated value in the token response, which deviates from RFC 6749 section 3.3 which calls for a space-delimited format.
Parse GitHub's response using its own format so GCM preserves the scopes granted to the user.
Note that real-world testing shows that GitHub accepts either of space or comma-separated scopes for the 'scope' request parameter/field, so we don't need to change our request logic, only the response handling.