.Net Core 3.1-如何生成Azure AD B2C的注册链接



我的ASP.NET Core 3.1 web应用程序使用Azure AD B2C。目前,有内置的用户界面供用户登录——基本上,让我们假设它只是VS2019中一个经过Azure B2C身份验证的新应用程序。

但我需要自定义这个UI并生成"注册">链接。如何做到这一点?

正如您对任何策略或用户流所做的那样:

https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{policy}/oauth2/v2.0/authorize?client_id={b2c app id}&response_type=code&redirect_uri={b2c app redirect uri, depending on the sdk used this may be a specific}&response_mode=query&scope={b2c app scope}&state={custom data}

例如:

https://contoso.b2clogin.com/contoso.onmicrosoft.com/b2c_1_sign_up/oauth2/v2.0/authorize?client_id=90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6&response_type=code&redirect_uri=https://myapp.azurewebsites.com/&response_mode=query&scope=90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6%20offline_access&state=arbitrary_data_you_can_receive_in_the_response

最新更新