Improvements to 'manage trusted extensions' flow

This commit is contained in:
Rachel Macfarlane
2020-04-01 23:13:50 -07:00
parent d8e3cca049
commit 917c420302
8 changed files with 106 additions and 27 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as uuid from 'uuid';
import { keychain } from './common/keychain';
import { GitHubServer } from './githubServer';
import Logger from './common/logger';
@@ -122,7 +123,7 @@ export class GitHubAuthenticationProvider {
private async tokenToSession(token: string, scopes: string[]): Promise<vscode.AuthenticationSession> {
const userInfo = await this._githubServer.getUserInfo(token);
return {
id: userInfo.id,
id: uuid(),
getAccessToken: () => Promise.resolve(token),
accountName: userInfo.accountName,
scopes: scopes