You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure AD B2C:不使用CombinedSignInAndSignUp步骤,能否在邮箱页显示社交登录按钮?

实现仅含邮箱字段、继续按钮和社交登录按钮的首个登录页面

可以实现,不需要使用Type="CombinedSignInAndSignUp"的编排步骤,只需修改你当前引用的SelfAsserted-UsernameDiscovery技术配置文件,添加社交登录相关配置即可。

具体配置修改:

  1. 在SelfAsserted-UsernameDiscovery的<Metadata>节点中添加IncludeSocialLoginButtons元数据,启用社交按钮显示:
    <Metadata>
      <Item Key="ContentDefinitionReferenceId">api.idpselections</Item>
      <Item Key="SignUpTarget">SignUpWithLogonEmailExchange</Item>
      <Item Key="IncludeSocialLoginButtons">true</Item>
    </Metadata>
    
  2. 在该技术配置的<ValidationTechnicalProfiles>节点中,添加你需要的社交登录技术配置引用(比如Facebook、Google等,需确保这些社交登录的技术配置已提前定义):
    <ValidationTechnicalProfiles>
      <ValidationTechnicalProfile ReferenceId="Facebook-OAUTH2" />
      <ValidationTechnicalProfile ReferenceId="Google-OAUTH2" />
      <!-- 按需添加其他社交登录提供商 -->
    </ValidationTechnicalProfiles>
    
  3. 配置会话管理,关联社交登录的会话技术配置:
    <UseTechnicalProfileForSessionManagement ReferenceId="SM-SocialLogin" />
    

修改后的完整SelfAsserted-UsernameDiscovery示例:

<TechnicalProfile Id="SelfAsserted-UsernameDiscovery">
  <DisplayName>Email Discovery</DisplayName>
  <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  <Metadata>
    <Item Key="ContentDefinitionReferenceId">api.idpselections</Item>
    <Item Key="SignUpTarget">SignUpWithLogonEmailExchange</Item>
    <Item Key="IncludeSocialLoginButtons">true</Item>
  </Metadata>
  <CryptographicKeys>
    <Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
  </CryptographicKeys>
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="signInName" />
  </InputClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
  </OutputClaims>
  <ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="Facebook-OAUTH2" />
    <ValidationTechnicalProfile ReferenceId="Google-OAUTH2" />
  </ValidationTechnicalProfiles>
  <UseTechnicalProfileForSessionManagement ReferenceId="SM-SocialLogin" />
</TechnicalProfile>

效果说明:

保持你原有的编排步骤不变,修改后的SelfAsserted-UsernameDiscovery会在页面上仅展示邮箱输入框、继续按钮,同时显示你配置的社交登录按钮,不会出现密码字段,完全符合你的需求。

内容的提问来源于stack exchange,提问作者Alpesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 21:44:49