【问题标题】:MSAL.Net and Xamarin.Forms having problem with redirect urlMSAL.Net 和 Xamarin.Forms 的重定向 url 有问题
【发布时间】:2020-07-04 07:26:36
【问题描述】:

我正在关注本指南https://github.com/Azure-Samples/active-directory-xamarin-native-v2/tree/master/1-Basic

并在我的 app.xaml.cs 中有此代码

public App()
{
    PCA = PublicClientApplicationBuilder.Create(applicationClientId)
            .WithTenantId("tenantidhere")
            .WithRedirectUri($"msal{applicationClientId}://auth")
            .WithIosKeychainSecurityGroup("com.microsoft.adalcache") // focussing on android first so ignore this one
            .Build();
    //...
}

我收到返回 url 有问题的消息...并且继续按钮似乎不起作用。我不知道这些问题是相关的还是单独的。

这是我在 azure AD 中的 azure 设置: 我觉得我必须切换回“旧体验”,因为指南/教程等似乎无法反映当前的 Azure UI。

【问题讨论】:

    标签: azure xamarin.forms azure-active-directory msal


    【解决方案1】:

    您将使用您的应用程序对应的 clientId 更新 MsalActivity.csAndroidManifest.xmlDataScheme 的值。

    【讨论】:

    • 我完全丢失了 MsalActivity.cs 文件,并且清单中的 id 错误。谢谢,会试一试,如果成功的话,标记为已接受。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-03
    • 2015-04-15
    • 1970-01-01
    • 2021-03-30
    • 1970-01-01
    • 2021-02-27
    • 1970-01-01
    相关资源
    最近更新 更多