首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure自定义策略B2c完成后忘记密码如何重定向到注册页面?

Azure自定义策略B2c完成后忘记密码如何重定向到注册页面?
EN

Stack Overflow用户
提问于 2021-09-14 09:38:42
回答 1查看 279关注 0票数 0

在我的注册形式,我有一个忘记密码链接,如果用户点击该链接忘记密码流将启动和用户能够更改他的密码,但它是重定向到网站的主页。

对问题的解释:

  1. 用户打开站点www.abc.com
  2. 单击“注册/登录”按钮。
  3. 重定向到B2c注册表单,我们忘记了密码链接
  4. 用户点击忘记密码后,电子邮件验证屏幕就会出现,验证用户可以更改密码,但是重定向到www.abc.com,我希望用户应该能够重定向到注册/登录页面,主要是步骤3,你能在这方面给我指点吗?
  • 代码: SignUpOrSignInWithPhoneOrEmail是步骤3中的默认用户旅程:

  • 第3号编配令:
代码语言:javascript
复制
     <OrchestrationStep Order="3" Type="InvokeSubJourney">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
                  <Value>isForgotPassword</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <JourneyList>
                <Candidate SubJourneyReferenceId="PasswordReset" />
              </JourneyList>
            </OrchestrationStep>
    
    Complete Userjourney lines
    
     <UserJourney Id="SignUpOrSignInWithPhoneOrEmail">
          <OrchestrationSteps>
            <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="signuporsignin-phone-email">
              <ClaimsProviderSelections>
                <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninPhoneEmailExchange" />
                <ClaimsProviderSelection TargetClaimsExchangeId="SignUpWithEmail" />
                <ClaimsProviderSelection TargetClaimsExchangeId="SignUpWithPhone" />
                <ClaimsProviderSelection TargetClaimsExchangeId="ChangePhoneNumber" />
                <ClaimsProviderSelection TargetClaimsExchangeId="FacebookExchange" />
                <ClaimsProviderSelection TargetClaimsExchangeId="GoogleExchange" />
                <ClaimsProviderSelection TargetClaimsExchangeId="LinkedInExchange" />
                <ClaimsProviderSelection TargetClaimsExchangeId="ForgotPasswordExchange" />
              </ClaimsProviderSelections>
              <ClaimsExchanges>
                <ClaimsExchange Id="LocalAccountSigninPhoneEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Phone-Email" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <OrchestrationStep Order="2" Type="ClaimsExchange">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isLocalAccountSignIn</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>objectId</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <ClaimsExchanges>
                <ClaimsExchange Id="SignUpWithPhone" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonPhoneNumber" />
                <ClaimsExchange Id="SignUpWithEmail" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
                <ClaimsExchange Id="ChangePhoneNumber" TechnicalProfileReferenceId="PhoneInputPage-ChangePhoneNumberClaimsProviderSelection" />
                <ClaimsExchange Id="FacebookExchange" TechnicalProfileReferenceId="Facebook-OAUTH" />
                <ClaimsExchange Id="GoogleExchange" TechnicalProfileReferenceId="Google-OAuth2" />
                <ClaimsExchange Id="LinkedInExchange" TechnicalProfileReferenceId="LinkedIn-OAuth2" />
                <ClaimsExchange Id="ForgotPasswordExchange" TechnicalProfileReferenceId="ForgotPassword" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <OrchestrationStep Order="3" Type="InvokeSubJourney">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
                  <Value>isForgotPassword</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <JourneyList>
                <Candidate SubJourneyReferenceId="PasswordReset" />
              </JourneyList>
            </OrchestrationStep>
            <OrchestrationStep Order="4" Type="ClaimsExchange">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isLocalAccountSignIn</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isEmailSignUp</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isPhoneSignUp</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
                  <Value>authenticationSource</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <ClaimsExchanges>
                <ClaimsExchange Id="AADUserReadUsingAlternativeSecurityId" TechnicalProfileReferenceId="AAD-UserReadUsingAlternativeSecurityId-NoError" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <OrchestrationStep Order="5" Type="ClaimsExchange">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>objectId</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isLocalAccountSignIn</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isEmailSignUp</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>isPhoneSignUp</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <ClaimsExchanges>
                <ClaimsExchange Id="SelfAsserted-Social" TechnicalProfileReferenceId="SelfAsserted-Social" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <OrchestrationStep Order="6" Type="InvokeSubJourney">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
                  <Value>isLocalAccountSignIn</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <JourneyList>
                <Candidate SubJourneyReferenceId="SignInWithPhoneOrEmail" />
              </JourneyList>
            </OrchestrationStep>
            <!-- -test changes//////////////////////////////////////////////////////////////////////////// -->
            <!-- For social IDP authentication, attempt to find the user account in the directory. -->
            <!-- Show self-asserted page only if the directory does not have the user account already (i.e. we do not have an objectId). 
              This can only happen when authentication happened using a social IDP. If local account was created or authentication done
              using ESTS in step 2, then an user account must exist in the directory by this time. -->
            <!-- This step reads any user attributes that we may not have received when authenticating using ESTS so they can be sent 
              in the token. -->
            <OrchestrationStep Order="7" Type="ClaimsExchange">
              <Preconditions>
                <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
                  <Value>authenticationSource</Value>
                  <Value>socialIdpAuthentication</Value>
                  <Value>hasFullProfile</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <ClaimsExchanges>
                <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <!-- The previous step (SelfAsserted-Social) could have been skipped if there were no attributes to collect 
                 from the user. So, in that case, create the user in the directory if one does not already exist 
                 (verified using objectId which would be set from the last step if account was created in the directory. -->
            <OrchestrationStep Order="8" Type="ClaimsExchange">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                  <Value>objectId</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <ClaimsExchanges>
                <ClaimsExchange Id="AADUserWrite" TechnicalProfileReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <!-- - test changes/////////////////////////////////////////////////////////////////////////////////////////////////// -->
            <OrchestrationStep Order="9" Type="InvokeSubJourney">
              <Preconditions>
                <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
                  <Value>isChangePhoneNumber</Value>
                  <Action>SkipThisOrchestrationStep</Action>
                </Precondition>
              </Preconditions>
              <JourneyList>
                <Candidate SubJourneyReferenceId="ChangePhoneNumber" />
              </JourneyList>
            </OrchestrationStep>
            <OrchestrationStep Order="10" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
          </OrchestrationSteps>
          <ClientDefinition ReferenceId="DefaultWeb" />
        </UserJourney>
EN

回答 1

Stack Overflow用户

发布于 2021-09-17 06:05:25

看起来你用的是转乘分程。你试过打电话的次旅程吗?一旦调用子旅程结束,调用它的旅程就会继续执行。如果这没有帮助,那么试着将您的业务划分为可重用的分配集,并调用PasswordReset旅程中的“主”流。不要忘记对NullClaim声明执行isPasswordReset声明转换,以避免永无止境的循环。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69175426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档