Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Account management UX #93811

Closed
3 tasks done
RMacfarlane opened this issue Mar 31, 2020 · 0 comments
Closed
3 tasks done

Test: Account management UX #93811

RMacfarlane opened this issue Mar 31, 2020 · 0 comments

Comments

@RMacfarlane
Copy link
Contributor

RMacfarlane commented Mar 31, 2020

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants