如何在 azure b2c 上设置自定义 IdP 的登录按钮

时间:2021-01-22 20:56:43

标签: azure-ad-b2c azure-ad-b2c-custom-policy

我想将我的自定义 IDP 集成添加到我的 B2C 登录中,但我在第一步中遇到了问题,无法在登录页面上放置自定义登录按钮。

我用 google 成功做了同样的事情,但不能用我的自定义 IDP 做到这一点。唯一出现的按钮是谷歌。关于如何添加自定义 IDP 的登录按钮的任何想法?

enter image description here

这是我的政策:

x %>%
  mutate(Vectorize(fun)(across(ends_with("_1"), 
         .names = "{col}_minus"), across(ends_with("_2"))))%>%
   do.call(data.frame, .) %>% 
   rename_at(vars(contains('minus')),
         ~ str_extract(., 'AD\\d+_\\d+_minus'))
#  Measure AD1_1 AD1_2 AD2_1 AD2_2 AD3_1 AD3_2 AD1_1_minus AD2_1_minus AD3_1_minus
#1  Height     6    10    10     3    12     8    Disagree    Disagree    Disagree
#2  Weight     8     9    13     6    14     7       Agree    Disagree    Disagree
#3   Width    10     9    11     5    12     8       Agree    Disagree    Disagree
#4  Length     8     9     8     7     8    13       Agree       Agree    Disagree

1 个答案:

答案 0 :(得分:0)

我找到了答案。必须在技术资料中设置 DisplayName

    <TechnicalProfiles>
        <TechnicalProfile Id="MyCustom-OAuth2">
        <DisplayName>MyCustom Button</DisplayName>
        ...
    </TechnicalProfiles>

行程如下:

<UserJourney Id="SignUpOrSignIn">
  <OrchestrationSteps>
  
    <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
      <ClaimsProviderSelections>
        <ClaimsProviderSelection TargetClaimsExchangeId="GoogleExchange" />
        <ClaimsProviderSelection TargetClaimsExchangeId="MyCustomExchange" />
        <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
      </ClaimsProviderSelections>
      <ClaimsExchanges>
        <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
      </ClaimsExchanges>
    </OrchestrationStep>

    <!-- Check if the user has selected to sign in using one of the social providers -->
    <OrchestrationStep Order="2" Type="ClaimsExchange">
      <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
          <Value>objectId</Value>
          <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
      </Preconditions>
      <ClaimsExchanges>
        <ClaimsExchange Id="GoogleExchange" TechnicalProfileReferenceId="Google-OAuth2" />
        <ClaimsExchange Id="MyCustomExchange" TechnicalProfileReferenceId="MyCustom-OAuth2" />
      </ClaimsExchanges>
    </OrchestrationStep>
    ...