Skip to content

Test: Account management UX #93811

@RMacfarlane

Description

@RMacfarlane

Refs: #90385

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions