CommunityToolkit / CommunityToolkit/Graph-Controls

MsalProvider uses unknown redirect URI, authentication fails

Đang mở
#188 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Area: Providers documentation :page_with_curl: question :grey_question:
Ngôn ngữ chính
C#
Star
156
Fork
38
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Describe the bug
When using the MsalProvider as documented and as in the sample, auth fails with AADSTS50011.

```
Request Id: 5e464c00-92a4-4a14-a5e6-f6c807527900
Correlation Id: 70fa290d-da9e-4a48-ac59-98da60a73410
Timestamp: 2022-04-29T14:51:55Z
Message: AADSTS50011: The redirect URI 'ms-appx-web://Microsoft.AAD.BrokerPlugin/S-1-15-2-3827128064-569582487-4294593430-3382639814-4294318972-3676523608-2734131615' specified in the request does not match the redirect URIs configured for the application '3892d014-2554-4df7-a10b-9f1e5c0742e7'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.
```

- [ ] 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. Register an app in Azure AD using the redirect URI `https://login.microsoftonline.com/common/oauth2/nativeclient`.
2. Configure your provider.

```csharp
string[] scopes = new string[] { "User.Read" };
ProviderManager.Instance.GlobalProvider =
new MsalProvider("CLIENT_ID", scopes);
```
3. Try to login with the `LoginButton`.

## Expected behavior
Should login

## Environment

```
NuGet Package(s):
CommunityToolkit.Authentication.Msal 7.1.1
CommunityToolkit.Graph.Uwp 7.1.1

Windows 11 Build Number: (10.0; Build 22000)

App min and target version: Windows 10, version 2104 (10.0; Build 20348), Target Windows 11 (10.0; Build 22000)

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

Visual Studio
- [ ] 2017 (version: )
- [ ] 2019 (version: )
- [ ] 2019 Preview (version: )
- [x] 2022 (version: 17.1.6)

```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

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.