Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure ad b2c 使用api.signuporsignin和自定义策略自定义注册页面_Azure Ad B2c_Azure Ad B2c Custom Policy - Fatal编程技术网

Azure ad b2c 使用api.signuporsignin和自定义策略自定义注册页面

Azure ad b2c 使用api.signuporsignin和自定义策略自定义注册页面,azure-ad-b2c,azure-ad-b2c-custom-policy,Azure Ad B2c,Azure Ad B2c Custom Policy,我在旅途中使用了api.signuporsignin,并自定义了登录页面,但当我点击注册链接时,它会转到MS默认注册页面,而不是自定义注册。我看到这个链接指向 有没有办法使用api.signuporsignin自定义注册页面 这是我的旅程 <UserJourney Id="SignUpWithEmailOrSignInWithUsernameOrEmail"> <OrchestrationSteps>

我在旅途中使用了api.signuporsignin,并自定义了登录页面,但当我点击注册链接时,它会转到MS默认注册页面,而不是自定义注册。我看到这个链接指向

有没有办法使用api.signuporsignin自定义注册页面

这是我的旅程

<UserJourney Id="SignUpWithEmailOrSignInWithUsernameOrEmail">
            <OrchestrationSteps>
                <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
                    <ClaimsProviderSelections>
                        <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninUsernameExchange" />
                    </ClaimsProviderSelections>
                    <ClaimsExchanges>
                        <ClaimsExchange Id="LocalAccountSigninUsernameExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Username" />
                    </ClaimsExchanges>
                </OrchestrationStep>
                <OrchestrationStep Order="2" Type="ClaimsExchange">
                <Preconditions>
                    <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                    <Value>objectId</Value>
                    <Action>SkipThisOrchestrationStep</Action>
                    </Precondition>
                </Preconditions>
                <ClaimsExchanges>
                    <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
                </ClaimsExchanges>
            </OrchestrationStep>

...

<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Username">
                <DisplayName>Local Account Signin with Username</DisplayName>
                <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
                <Metadata>
                    <Item Key="SignUpTarget">SignUpWithLogonUsernameExchange</Item>
                    <Item Key="setting.operatingMode">Username</Item>
                    <Item Key="ContentDefinitionReferenceId">api.selfasserted.test</Item>
                </Metadata>

目标
SkipThisOrchestrationStep
...
使用用户名登录本地帐户
使用LogonUserNameExchange注册
用户名
api.selfasserted.test
谢谢

编辑1:添加内容定义。我可以自定义登录页面,但不能注册。当您点击“立即注册”链接时,将显示默认的MS页面

<ContentDefinitions>
        <ContentDefinition Id="api.signuporsignin">
            <LoadUri>https://something.blob.core.windows.net/mycontainer/custom-ui.html</LoadUri>
            <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
            <DataUri>urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0</DataUri>
            <Metadata>
                <Item Key="DisplayName">Signin and Signup</Item>
            </Metadata>
        </ContentDefinition>
        <ContentDefinition Id="api.selfasserted.test">
            <LoadUri>https://something.blob.core.windows.net/mycontainer/custom-signup.html</LoadUri>
            <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
        <DataUri>urn:com:microsoft:aad:b2c:elements:selfasserted:1.1.0</DataUri>
            <Metadata>
            <Item Key="DisplayName">Collect information from user page</Item>
            </Metadata>
      </ContentDefinition>
    </ContentDefinitions>

https://something.blob.core.windows.net/mycontainer/custom-ui.html
~/common/default\u page\u error.html
urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0
签到
https://something.blob.core.windows.net/mycontainer/custom-signup.html
~/common/default\u page\u error.html
urn:com:microsoft:aad:b2c:elements:selfasserted:1.1.0
从用户页面收集信息

正如@Allen Wu建议的那样,在TrustFrameworkExtensions.xml中搜索'api.signuporsignin',检查Loaduri是否与您在Azure AD protal->存储帐户->容器中设置的url一致


https://storage1.blob.core.windows.net/root/custom-ui.html
~/common/default\u page\u error.html
urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0
签到

查看您的信任框架基础定义,以及(未上市)用户旅程的其他部分

“注册”或“登录”页面仅提供指向“注册”页面的链接,该页面基本上跳过了编排步骤。注册或登录页面之后的第二个业务流程步骤通常会测试用户对象ID声明是否存在(即-用户是否实际登录),然后在用户尝试注册而未登录时使用单独的内容定义运行注册步骤

例如,在MS提供的基本策略中:

<UserJourney Id="SignUpOrSignIn">
      <OrchestrationSteps>
      
        <!-- Present the sign up or sign in page, with `api.signuporsignin` -->
        <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
          <ClaimsProviderSelections>
            <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
          </ClaimsProviderSelections>
          <ClaimsExchanges>
            <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
          </ClaimsExchanges>
        </OrchestrationStep>

        <!-- 
            If the previous step did not generate a user object ID (IE - 
            sign the user in), show the sign up page.
 
            The `LocalAccountSignUpWithLogonEmail` technical profile 
            should use a diffrent content definion because it's a self-assert
            profile - in this case `api.localaccountsignup` - You'll need to
            customize this content definition too.
         -->
        <OrchestrationStep Order="2" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
          </ClaimsExchanges>
        </OrchestrationStep>
...

目标
SkipThisOrchestrationStep
...

是否设置了api.signuporsignin
ContentDefinition
元素的
LoadUri
属性?正如这所暗示的,是的。登录页面具有新布局,但未注册。我添加了我的内容定义Shi gllambi,我相信您遇到的问题与注册技术配置文件中使用的内容定义有关。你能发布注册档案代码和相关内容定义的代码吗?是的,我在postHi上添加了我使用的内容定义,非常感谢!我使用的是LocalAccountSignUpWithLogonEmail techprofile。更新了api.localaccountsignup内容定义并成功!
<UserJourney Id="SignUpOrSignIn">
      <OrchestrationSteps>
      
        <!-- Present the sign up or sign in page, with `api.signuporsignin` -->
        <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
          <ClaimsProviderSelections>
            <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
          </ClaimsProviderSelections>
          <ClaimsExchanges>
            <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
          </ClaimsExchanges>
        </OrchestrationStep>

        <!-- 
            If the previous step did not generate a user object ID (IE - 
            sign the user in), show the sign up page.
 
            The `LocalAccountSignUpWithLogonEmail` technical profile 
            should use a diffrent content definion because it's a self-assert
            profile - in this case `api.localaccountsignup` - You'll need to
            customize this content definition too.
         -->
        <OrchestrationStep Order="2" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
          </ClaimsExchanges>
        </OrchestrationStep>
...