Move id, label, and options to authentication provider registration

This commit is contained in:
Rachel Macfarlane
2021-01-11 10:52:55 -08:00
parent e9ae008296
commit c85297669e
5 changed files with 65 additions and 80 deletions

View File

@@ -22,10 +22,7 @@ export async function activate(context: vscode.ExtensionContext) {
return loginService.manuallyProvideToken();
}));
context.subscriptions.push(vscode.authentication.registerAuthenticationProvider({
id: 'github',
label: 'GitHub',
supportsMultipleAccounts: false,
context.subscriptions.push(vscode.authentication.registerAuthenticationProvider('github', 'GitHub', {
onDidChangeSessions: onDidChangeSessions.event,
getSessions: () => Promise.resolve(loginService.sessions),
login: async (scopeList: string[]) => {
@@ -79,7 +76,7 @@ export async function activate(context: vscode.ExtensionContext) {
throw e;
}
}
}));
}, { supportsMultipleAccounts: false }));
return;
}