【问题标题】:How to add social identity provider buttons to selfAsserted.html page in Azure B2C如何将社交身份提供程序按钮添加到 Azure B2C 中的 selfAsserted.html 页面
【发布时间】:2020-10-06 05:39:38
【问题描述】:

这与问题How to create an email only page in Azure AD B2C? 有关

我想将 Facebook、Google 和 MSA 社交身份提供商按钮添加到 selfAsserted.html 页面而不是 unity.html 页面。这些是我的编排步骤和技术简介:

<UserJourney Id="SignUpOrSignIn">
            <OrchestrationSteps>
                <OrchestrationStep Order="1" Type="ClaimsExchange" ContentDefinitionReferenceId="api.selfasserted">
                    <ClaimsProviderSelections>
                        <ClaimsProviderSelection TargetClaimsExchangeId="FacebookExchange" />
                        <ClaimsProviderSelection TargetClaimsExchangeId="GoogleExchange" />
                        <ClaimsProviderSelection TargetClaimsExchangeId="MicrosoftAccountExchange" />
                    </ClaimsProviderSelections>
                    <ClaimsExchanges>
                        <ClaimsExchange Id="LocalAccountSigninEmailOnlyExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-EmailOnly" />
                    </ClaimsExchanges>
                </OrchestrationStep>
                <OrchestrationStep Order="2" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
                    <ClaimsProviderSelections>
                        <!--<ClaimsProviderSelection TargetClaimsExchangeId="FacebookExchange" />
                        <ClaimsProviderSelection TargetClaimsExchangeId="GoogleExchange" />
                        <ClaimsProviderSelection TargetClaimsExchangeId="MicrosoftAccountExchange" />-->
                        <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
                    </ClaimsProviderSelections>
                    <ClaimsExchanges>
                        <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
                    </ClaimsExchanges>
                </OrchestrationStep>
...
</UserJourneys>

<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-EmailOnly">
              <DisplayName>Local Account Signin</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.selfasserted</Item>
              </Metadata>
              <IncludeInSso>false</IncludeInSso>
              <OutputClaims>
                  <OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
              </OutputClaims>
              <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
          </TechnicalProfile>

【问题讨论】:

    标签: azure azure-active-directory azure-ad-b2c


    【解决方案1】:

    您只能在合并的登录和注册编排步骤或 idpselections 页面上添加 IdP 按钮。

    OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">

    或者

    OrchestrationStep Order="1" Type="ClaimsProviderSelection" ContentDefinitionReferenceId="api.idpselections">

    【讨论】:

    • 我在编排步骤中将 api.selfasserted 替换为 api.idpselections ,但它不起作用。然后,我在编排步骤和技术配置文件中将 api.selfasserted 替换为 api.idpselections ,但我仍然没有看到提供程序。另外,如果我真的让它工作了,我还能让电子邮件字段与社交提供者按钮一起显示吗?
    • 编排步骤类型是否符合我的示例?它将显示电子邮件 + 密码和社交服务提供商,而不仅仅是您打算做的电子邮件。这只是入门包中的默认设置。
    • 正如我链接的帖子所述,我不希望页面上有密码。只需电子邮件和 idp 按钮。
    • 您只能拥有这 3 个: 1. 社交 IdP 按钮 + 用户名/密码 - (联合登录和注册页面) 2. 用户名 + 密码 - (自我声明页面或联合登录和登录)向上页面)3. 所有 IdP 的按钮(社交 + 本地)-(组合登录和注册页面或 idpselection 页面)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-15
    • 2017-01-03
    相关资源
    最近更新 更多