Address feedback on auth provider API

This commit is contained in:
Rachel Macfarlane
2020-07-16 16:03:17 -07:00
parent 0d1933a322
commit a155fcf762
6 changed files with 14 additions and 47 deletions

View File

@@ -141,7 +141,12 @@ export class GitHubAuthenticationProvider {
private async tokenToSession(token: string, scopes: string[]): Promise<vscode.AuthenticationSession> {
const userInfo = await this._githubServer.getUserInfo(token);
return new vscode.AuthenticationSession(uuid(), token, { label: userInfo.accountName, id: userInfo.id }, scopes);
return {
id: uuid(),
accessToken: token,
account: { label: userInfo.accountName, id: userInfo.id },
scopes
};
}
private async setToken(session: vscode.AuthenticationSession): Promise<void> {