Closed
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