-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
auth:oauthSpecific to OAuth2 authenticationSpecific to OAuth2 authenticationhost:genericSpecific to the generic (basic/WIA) host providerSpecific to the generic (basic/WIA) host provider
Description
To add OAuth support for a new forge requires around a thousand lines of code which has to be reviewed (example PRs: GitLab, Gitea, Gitee). Each new assembly adds megabytes to git-credential-manager binary size. Is any code necessary? All are similar OAuth implementations with only trivial differences in OAuth parameters.
Ideally you could use GCM with any generic OAuth forge with only simple config to specify the OAuth parameters, no code change necessary.
https://github.com/hickford/git-credential-oauth has this feature. Here's an example config for gitee.com:
[credential "https://gitee.com"]
oauthClientId = b5da229f85d94f5d728c43e429c69527fe2dcc387d4ffcb677b91c93983adaa3
oauthClientSecret = a9f88c722f66e54184204efa0f49b960f2666947e0b14bd0d73a8c9c1c33c340
oauthScopes = projects gists
oauthAuthURL = /oauth/authorize
oauthTokenURL = /oauth/token
# workaround server confused by random ports
oauthRedirectURL = http://127.0.0.1:53119
Metadata
Metadata
Assignees
Labels
auth:oauthSpecific to OAuth2 authenticationSpecific to OAuth2 authenticationhost:genericSpecific to the generic (basic/WIA) host providerSpecific to the generic (basic/WIA) host provider
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]Support for generic OAuth forges through simple config without writing any code[/-][+]Support any OAuth server with custom config[/+]maikebing commentedon Jan 23, 2023
Great job!
ldennington commentedon Jan 24, 2023
Thanks @hickford! This is something we've been talking about internally for awhile given the number of different Git hosts/forges that want GCM support via OAuth. In light of this, we've decided generic OAuth provider support would make sense here. We plan to have this complete in time for Git 2.40 release.
mjcheetham commentedon Feb 1, 2023
Now that #1062 has been merged this means the next GCM release will include support for generic OAuth providers!
maikebing commentedon Feb 3, 2023
Maybe the LOGO path configuration is missing? @mjcheetham
mjcheetham commentedon Feb 7, 2023
Are you looking for a way to add custom branding/logos to the generic OAuth UI prompts?
At the moment we don't plan to add support for customising the UI with branding. If you wanted to submit a PR adding the functionality we would consider it! Configuration pointing at either a local or remote file (URL) may be one acceptable method for this, but we'd want to be sure pulling external content from the Internet to be rendered was safe.
ldennington commentedon Mar 7, 2023
Closing as this feature was released in 2.0.935 🎉 .