且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Azure AD B2C配置多个登录策略

更新时间:2022-06-06 22:42:49

您可以通过

,然后在身份验证中间件中设置所请求策略的重定向URL :

OnRedirectToIdentityProvider = async context =>
{
    var policy = context.Properties.Items.ContainsKey(Constants.AuthenticationProperties.Policy) ? context.Properties.Items[Constants.AuthenticationProperties.Policy] : Constants.Policies.SignUpOrSignInWithPersonalAccount;
    var configuration = await GetB2COpenIdConnectConfigurationAsync(context, policy);
    context.ProtocolMessage.IssuerAddress = configuration.AuthorizationEndpoint;
}

这篇关于Azure AD B2C配置多个登录策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

阿里云证书,YYDS!