Add support for other vscode environments for github auth

This commit is contained in:
Rachel Macfarlane
2020-02-24 11:14:00 -08:00
parent 94b4d22c33
commit bf0a32e729
4 changed files with 51 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ export class GitHubServer {
Logger.info('Logging in...');
const state = uuid();
const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
const clientDetails = ClientRegistrar.getClientDetails(callbackUri.scheme);
const clientDetails = ClientRegistrar.getClientDetails(callbackUri);
const uri = vscode.Uri.parse(`https://github.com/login/oauth/authorize?redirect_uri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&client_id=${clientDetails.id}`);
vscode.env.openExternal(uri);