Add /login/oauth path part to the ghes supported authorization server (#265703)

Fixes GHE MCP loading
This commit is contained in:
Tyler James Leonhardt
2025-09-08 10:38:49 -07:00
committed by GitHub
parent 85b4d6696e
commit 2deaa78bcf

View File

@@ -171,6 +171,9 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
return sessions;
});
const supportedAuthorizationServers = ghesUri
? [vscode.Uri.joinPath(ghesUri, '/login/oauth')]
: [vscode.Uri.parse('https://github.com/login/oauth')];
this._disposable = vscode.Disposable.from(
this._telemetryReporter,
vscode.authentication.registerAuthenticationProvider(
@@ -179,9 +182,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
this,
{
supportsMultipleAccounts: true,
supportedAuthorizationServers: [
ghesUri ?? vscode.Uri.parse('https://github.com/login/oauth')
]
supportedAuthorizationServers
}
),
this.context.secrets.onDidChange(() => this.checkForUpdates())