Skip to content

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

@Richasy

Description

@Richasy

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.

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

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);
  1. Launch app and click "Sign In" button
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions