Code cleanup, remove stuff related to sign in commands

This commit is contained in:
Rachel Macfarlane
2020-04-16 19:29:56 -07:00
parent bb3450167d
commit 87287d0275
6 changed files with 13 additions and 40 deletions

View File

@@ -21,14 +21,12 @@ export async function activate(context: vscode.ExtensionContext) {
vscode.authentication.registerAuthenticationProvider({
id: 'github',
displayName: 'GitHub',
supportsMultipleAccounts: false,
onDidChangeSessions: onDidChangeSessions.event,
getSessions: () => Promise.resolve(loginService.sessions),
login: async (scopeList: string[] | undefined) => {
login: async (scopeList: string[]) => {
try {
telemetryReporter.sendTelemetryEvent('login');
const loginScopes = scopeList ? scopeList.sort().join(' ') : 'user:email';
const session = await loginService.login(loginScopes);
const session = await loginService.login(scopeList.sort().join(' '));
Logger.info('Login success!');
onDidChangeSessions.fire({ added: [session.id], removed: [], changed: [] });
return session;