簡體   English   中英

如何在 azure b2c 上設置自定義 IdP 的登錄按鈕

[英]How to set login button of custom IdP on azure b2c

我想將自定義 IDP 集成添加到我的 B2C 登錄中,但在第一步中遇到了麻煩,即在登錄頁面上放置自定義登錄按鈕。

我用谷歌成功地做了同樣的事情,但不能用我的自定義 IDP 做到這一點。 出現的唯一按鈕是谷歌。 關於如何添加我的自定義 IDP 的登錄按鈕的任何想法?

在此處輸入圖像描述

這是我的政策:

<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="Google-OAuth2" />
      </ClaimsExchanges>
    </OrchestrationStep>
    ...
  </UserJourney>

我找到了答案。 必須在 Technical Profile 上設置 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>
    ...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM