enhance(oauth): pre-register a builtin OAuth2 application for gitea-vscode (#39785)

The [Gitea VS Code extension](https://gitea.com/gitea/gitea-vscode)
currently signs in through the builtin `tea` OAuth2 application. Gitea
keeps one grant per user and application, so anyone who has already
signed in with the tea CLI gets `a grant exists with different scope`
when the extension requests its own scopes, and sign-in fails
(gitea/gitea-vscode#24).

This adds a dedicated builtin application for the extension, following
the same mechanism as the existing CLI entries:
This commit is contained in:
bircni authored and GitHub committed 2026-10-16 06:48:13 +00:00
1 parent a36bb47c84
commit 70a5ff725c
4 files changed
+14 -3

No files matched your search

+10
View File
@@ -87,6 +87,16 @@ func BuiltinApplications() map[string]*BuiltinOAuth2Application {
DisplayName: "Gitea App",
RedirectURIs: []string{"com.gitea.app://oauth/callback"},
}
m["75a9ec3e-42b5-40cb-9144-9ea96ecd56a6"] = &BuiltinOAuth2Application{
ConfigName: "gitea-vscode",
DisplayName: "gitea-vscode",
RedirectURIs: []string{
"http://127.0.0.1",
"https://127.0.0.1",
"vscode://gitea.gitea-for-vscode/auth/callback",
"vscode-insiders://gitea.gitea-for-vscode/auth/callback",
},
}
return m
}