From 2deaa78bcf599b8b372163d98b90e998fabf85f7 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt <2644648+TylerLeonhardt@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:38:49 -0700 Subject: [PATCH] Add `/login/oauth` path part to the ghes supported authorization server (#265703) Fixes GHE MCP loading --- extensions/github-authentication/src/github.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/github-authentication/src/github.ts b/extensions/github-authentication/src/github.ts index dab57ffd776..e9f97282bf8 100644 --- a/extensions/github-authentication/src/github.ts +++ b/extensions/github-authentication/src/github.ts @@ -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())