extensions/github-authentication/src/githubServer.ts/GitHubServer/getRedirectEndpoint
class GitHubServer:	private async getRedirectEndpoint(): Promise<string> {
		if (this._redirectEndpoint) {
			return this._redirectEndpoint;
		}
		if (this._type === AuthProviderType.github) {
			const proxyEndpoints = await vscode.commands.executeCommand<{ [providerId: string]: string } | undefined>('workbench.getCodeExchangeProxyEndpoints');
			// If we are running in insiders vscode.dev, then ensure we use the redirect route on that.
			this._redirectEndpoint = REDIRECT_URL_STABLE;
			if (proxyEndpoints?.github && new URL(proxyEndpoints.github).hostname === 'insiders.vscode.dev') {
				this._redirectEndpoint = REDIRECT_URL_INSIDERS;
			}
			return this._redirectEndpoint;
		} else {
			// GHES
			const result = await fetching(this.getServerUri('/meta').toString(true));
			if (result.ok) {
				try {
					const json: { installed_version: string } = await result.json();
					const [majorStr, minorStr, _patch] = json.installed_version.split('.');
					const major = Number(majorStr);
					const minor = Number(minorStr);
					if (major >= 4 || major === 3 && minor >= 8
					) {
						// GHES 3.8 and above used vscode.dev/redirect as the route.
						// It only supports a single redirect endpoint, so we can't use
						// insiders.vscode.dev/redirect when we're running in Insiders, unfortunately.
						this._redirectEndpoint = 'https://vscode.dev/redirect';
					}
				} catch (e) {
					this._logger.error(e);
				}
			}

			// TODO in like 1 year change the default vscode.dev/redirect maybe
			this._redirectEndpoint = 'https://vscode-auth.github.com/';
		}
		return this._redirectEndpoint;
	}