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

Return only unique accounts from credential stores #1369

Merged

Conversation

mjcheetham
Copy link
Collaborator

@mjcheetham mjcheetham commented Aug 7, 2023

If may be possible for multiple credentials for the same user account to exist in any credential store. To avoid issues with redundant account selection prompts we should ensure duplicate accounts are removed from the results of ICredentialStore.GetAccounts.

Call .Distinct() or use a HashSet where appropriate on all implementation of ICredentialStore.GetAccounts.

If there are multiple credentials for the same account, we'd only ever be able to retrieve the first enumerated credential regardless because our matching logic is to return to first credential that matches.

Fixes #1368

If may be possible for multiple credentials for the same user account to
exist in any credential store. To avoid issues with redundant account
selection prompts we should ensure duplicate accounts are removed from
the results of `ICredentialStore.GetAccounts`.

Call `.Distinct()` or use a `HashSet` where appropriate on all
implementation of `ICredentialStore.GetAccounts`.
@mjcheetham mjcheetham merged commit 4e2a898 into git-ecosystem:main Aug 7, 2023
6 checks passed
@mjcheetham mjcheetham deleted the credstore-distinct-accounts branch August 7, 2023 18:56
@ldennington ldennington mentioned this pull request Aug 11, 2023
ldennington added a commit that referenced this pull request Aug 11, 2023
Changes:

- Ensure only unique accounts are returned from credential store
  - Issue: #1368
  - PR: #1369
- Migrate GCM from `microsoft/homebrew-git` to `Homebrew/homebrew-core`
tap
  - Issue: #1102 
  - PR: #1374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Still showing prompt with multiple accounts even though they're equivalent
2 participants