-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Closed
Labels
Milestone
Description
Refs: #90385
- macOS @chrisdias
- linux @aeschli
- windows @dbaeumer
Complexity: 3
Accounts added from authentication providers should now be displayed under a new "Accounts" icon on the activity bar.
Interaction with Settings Sync
- "Sign in to Microsoft" entry should sign in, then prompt to turn on settings sync
- Signing into an additional account should show a quick pick to change accounts
- Signing out of the settings sync account should prompt to turn off settings sync
Managing trusted extensions
- When an extension first tries to login or resolve an access token using the auth provider API, a consent prompt should be shown to the user. If the user clicks allow, this extension should show up under the "Manage Trusted Extensions" list for the account
Sample extension code:
export async function activate(context: vscode.ExtensionContext) {
const scope = ['user:email'];
context.subscriptions.push(vscode.commands.registerCommand(
"github-auth.helloWorld",
async () => {
let token;
const result = await vscode.authentication.getSessions("github", scope);
if (!result.length) {
const session = await vscode.authentication.login("github", scope);
token = await session.getAccessToken();
} else {
token = await result[0].getAccessToken();
}
vscode.window.showInformationMessage(`Got token ${token}`);
}
));
}
- If the extension is removed from the list using "Manage Trusted Extensions", the consent prompt should be shown again on all subsequent login or getAcessToken calls