Skip to content

Conversation

@gjsjohnmurray
Copy link
Contributor

This PR fixes #137601

Internal structure now uses JSON-stringify form of scopes array in place of simple join.

Variable name changed to correspond.

commandId for generated login command now uses a naming scheme that will avoid clashes.

Two interfaces that aren't being used elsewhere are no longer exported.

/assign @TylerLeonhardt

@gjsjohnmurray
Copy link
Contributor Author

Repro available in my branch of authenticationprovider-sample which adds two quiet logins:

image

  1. Build from the branch and run.
  2. Run the Login with Azure DevOps command that the extension contributes.
  3. Before the fix in this PR:

image

  1. After:

image

The two quiet logins are now accessible, but the screenshot reveals another issue, which is that the menu item prompts for the two different-scopes requests are identical. I will open a separate issue for this.

@TylerLeonhardt
Copy link
Member

Couldn't we join them with a comma instead? JSON stringify is fine...but I don't want the usage to give off some impression that we deserialize the scopes later since we don't do that.

@gjsjohnmurray
Copy link
Contributor Author

Based on this section of the OAuth2 a scope could contain a comma. But space, doublequote and backslash aren't allowed in a scope. So I've pushed a change to use space as the separator, and to fix a path my original change hadn't accounted for.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TylerLeonhardt TylerLeonhardt added this to the November 2021 milestone Nov 22, 2021
@TylerLeonhardt TylerLeonhardt merged commit 5128d2c into microsoft:main Nov 22, 2021
guibber pushed a commit to guibber/vscode that referenced this pull request Nov 30, 2021
…fix microsoft#137601) (microsoft#137613)

* Avoid conflicting scopes and commandIds in quiet logins from Accounts (fix microsoft#137601)

* revert from scopesJSON to scopesList but use space as separator

* define SCOPESLIST_SEPARATOR and use it consistently

* simplify diff
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2022
@gjsjohnmurray gjsjohnmurray deleted the fix-137601 branch August 16, 2024 04:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quiet authentication requests with different scopes might not be distinct on Accounts icon

2 participants