用于Web应用程序和本机移动的Azure B2C



我确信这个场景必须得到支持,但我找不到如何做到这一点的例子。

我有一个.NET核心Web应用程序,它使用Azure AD B2C和自定义html页面进行注册、登录、配置文件编辑等。

我想创建一些iOS和Android应用程序,它们与同一B2C租户交互,但提供自己的本地屏幕,只从商业逻辑与B2C交互。

本地应用程序是否只需要使用Microsoft Graph来登录用户、重置密码、编辑配置文件等?或者他们可以使用MSAL库(但不使用策略流中定义的自定义html页面(来驱动其本地身份验证屏幕吗?

•他们肯定可以通过编写android和iOS应用程序代码的各种平台使用MSAL库,即在JavaKotlin中。此外,MSAL库调用'com.microsoft.identity.client'作为依赖项,用于通过进行交互式授权请求回调的应用程序启动和合并Azure AD B2C身份和授权。请找到下面的文档链接及其代码片段,其中显示了出于身份验证目的使用MSAL库的情况。

这是要添加到'AndroidManifest.xml'文件中的文件代码段:-

‘ <!--Intent filter to capture System Browser or Authenticator calling back to our app after sign-in-->
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="msauth"
android:host="Package_Name"
android:path="/Signature_Hash" />
</intent-filter>
</activity> ‘

重定向URI:-

‘ msauth://com.azuresamples.msalandroidapp/1wIqXSqBj7w%2Bh11ZifsnqwgyKrY%3D ’

•请在下面找到Microsoft文档的链接,该链接清楚地说明了MSAL库用于Azure AD B2C身份验证:-

https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-android-app?tabs=java

https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-sample-android-app?tabs=kotlin#step-5-配置-示例-移动应用

最新更新