github auth: improve test env detection

cc @RMacfarlane
This commit is contained in:
João Moreno 2021-04-14 08:59:55 +02:00
parent b5dfdbe00f
commit a09d640311
No known key found for this signature in database
GPG key ID: 896B853774D1A575

View file

@ -45,7 +45,7 @@ export class GitHubServer {
constructor(private readonly telemetryReporter: TelemetryReporter) { }
private isTestEnvironment(url: vscode.Uri): boolean {
return url.authority === 'vscode-web-test-playground.azurewebsites.net' || url.authority.startsWith('localhost:');
return /\.azurewebsites\.net$/.test(url.authority) || url.authority.startsWith('localhost:');
}
public async login(scopes: string): Promise<string> {