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())