Skip to content

Commit a7cdefd

Browse files
Add /login/oauth path part to the ghes supported authorization server (#265703) (#265728)
Fixes GHE MCP loading
1 parent 67a0ecd commit a7cdefd

File tree

1 file changed

+4
-3
lines changed
  • extensions/github-authentication/src

1 file changed

+4
-3
lines changed

extensions/github-authentication/src/github.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
171171
return sessions;
172172
});
173173

174+
const supportedAuthorizationServers = ghesUri
175+
? [vscode.Uri.joinPath(ghesUri, '/login/oauth')]
176+
: [vscode.Uri.parse('https://github.com/login/oauth')];
174177
this._disposable = vscode.Disposable.from(
175178
this._telemetryReporter,
176179
vscode.authentication.registerAuthenticationProvider(
@@ -179,9 +182,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
179182
this,
180183
{
181184
supportsMultipleAccounts: true,
182-
supportedAuthorizationServers: [
183-
ghesUri ?? vscode.Uri.parse('https://github.com/login/oauth')
184-
]
185+
supportedAuthorizationServers
185186
}
186187
),
187188
this.context.secrets.onDidChange(() => this.checkForUpdates())

0 commit comments

Comments
 (0)