CommunityToolkit / Graph-Controls

Set of Helpers and Controls for Windows development using the Microsoft Graph.
https://docs.microsoft.com/en-us/windows/communitytoolkit/graph/overview
Other
154 stars 39 forks source link

WindowsProvider displays two “Work or school account" options when using WebAccountProviderType.Any #199

Closed Richasy closed 1 year ago

Richasy commented 1 year ago

Describe the bug

When creating a WindowsProvider via WebAccountProviderType.Any, the "Use a different account" section in the pop-up will display two "Work or school account" options.

After testing, the first option will normally guide the user to log in to the AAD account, but the second option has the same function as Local, it will directly log in to the local account. But the information it presents is too misleading.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Open UwpWindowsProviderSample project.
  2. Associate with the Store app.
  3. Use such code:
    var providerConfig = new WebAccountProviderConfig(WebAccountProviderType.Any, "Your_Client_Id");
    ProviderManager.Instance.GlobalProvider = new WindowsProvider(scopes, providerConfig, accountsSettingsPaneConfig: paneConfig);
  4. Launch app and click "Sign In" button
  5. Scroll to the bottom and observe the account options

Expected behavior

Show only one login option for AAD.

Screenshots

image

Environment

NuGet Package(s): CommunityToolkit.Authentication.Uwp

Package Version(s): 7.1.2

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] Windows 11 (22000)

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] Windows 11 (22000)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2019 (version: ) 
- [ ] 2022 (version: 17.3.6)

Additional context

Using the Local method does not require UI guidance, and there is no need to add an account option to the user selection screen. And since its description duplicates the real AAD option, it is recommended to remove.

ghost commented 1 year ago

Hello Richasy, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michael-hawker commented 1 year ago

Was able to repro locally on top of the new build checks, so can validate the PR once #202