CommunityToolkit / CommunityToolkit/Graph-Controls

[Feature] Build a LoginButton control based on WebAccount metadata

未关闭
#126 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Area: Controls
主要语言
C#
星标
156
派生
38
PR 合并指标
30 天内没有已合并 PR

描述

## Describe the problem this feature would solve

Currently, the LoginButton uses Graph to request the user display name and image. This returns an experience that is consistent across surfaces that also use Graph data, but not necessarily consistent with Windows. Apps/services on Windows desktop use the details provided by the WebAccount object returned by the Windows platform.

We should offer a solution that is more inline with what the OS is doing. Added bonus is that it doesn't require a Graph request, so the button can be written entirely with Windows APIs, without any additional steps or explicit web requests.

## Describe the solution

- In the `CommunityToolkit.Authentication.Uwp` package, create a new LoginButton based control
- Copy code where it makes sense, don't build on top of the existing LoginButton to avoid taking dependency on Graph
- Remove references to the Graph SDK and swap the Graph `User` object reference for `WebAccount` instead.
- Update the LoadState method to pull the WebAccount from an active WindowsProvider and load the username and photo.
- If the GlobalProvider is not an instance of WindowsProvider, disable the control.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。