[Feature] Build a LoginButton control based on WebAccount metadata

Đang mở
#126 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
authentication, frontend

Hướng nghiên cứu

Bắt đầu trong gói CommunityToolkit.Authentication.Uwp bằng cách xem xét LoginButton và WindowsProvider hiện có, đặc biệt là đường dẫn LoadState. Tạo một control riêng biệt không có tham chiếu đến Graph SDK, đọc tên người dùng và ảnh từ một WebAccount; khi GlobalProvider không phải là một WindowsProvider, control phải bị vô hiệu hóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Area: Controls

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.
Ngôn ngữ chính
C#
Star
156
Fork
37
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CommunityToolkit/Graph-Controls

Tất cả issue của CommunityToolkit/Graph-Controls

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.