Сеанс Azure B2C вызывает непредвиденный поток

Может ли кто-нибудь помочь мне разобраться в этом поведении с помощью Azure AD B2C и раскрыть то, чего я не понимаю, когда дело доходит до сеанса единого входа.

У меня есть довольно сложная настраиваемая политика для входа в систему, которая включает дополнительные пути как для настраиваемой регистрации, так и для встроенного пароля сброса после пример встроенного сброса пароля. У меня есть претензия signinOption, для которой устанавливается значение SignUp или ForgotPassword в зависимости от выбора поставщика утверждений на CombinedSignInAndSignUp этапе оркестрации. Затем я проверяю значение signinOption, чтобы решить, запускать ли каждое дополнительное путешествие. Все это работает отлично с первого раза.

Моя проблема возникает при использовании MSAL с React, но я еще не придумал, как ее надежно воспроизвести. Похоже, что MSAL отправляет файлы cookie, а B2C обнаруживает существующий сеанс, поэтому пропускает экран входа и отправляет меня в один из дополнительных путешествий (SignUp или ForgotPassword). Закрытие браузера не решает эту проблему. Каждый раз, когда я запускаю свое веб-приложение, оно запускает настраиваемую политику входа, и я попадаю не на тот экран. Единственный способ исправить это состояние - это очистить файлы cookie для моего домена клиента B2C.

У меня есть журнал User Journey, и я надеюсь, что кто-нибудь поможет мне проанализировать его, чтобы понять, что происходит не так. В этом случае поток переходит непосредственно к пути забытого пароля. Я вижу, что он выполняет ForgotPasswordExchange, который устанавливает мое signinOption требование, и это то, что запускает дополнительное путешествие. У меня вопрос: почему он выполняет ForgotPasswordExchange, когда пользователь не нажимал «Забыли пароль» на экране входа, поскольку экран входа был полностью пропущен.

Он как-то запоминает это из сеанса?

Некоторый код, чтобы дать представление о моей настройке, вот ключевые части.

Замена забытого пароля и ссылки для подписки:

<TechnicalProfile Id="ForgotPassword">
    <DisplayName>Forgot your password?</DisplayName>
    <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
    <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="signinOption" DefaultValue="ForgotPassword" AlwaysUseDefaultValue="true"/>
    </OutputClaims>
</TechnicalProfile>
<TechnicalProfile Id="SignUp">
    <DisplayName>Sign up?</DisplayName>
    <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.ClaimsTransformationProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
    <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="signinOption" DefaultValue="SignUp" AlwaysUseDefaultValue="true"/>
    </OutputClaims>
</TechnicalProfile>
<TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
    <Metadata>
        <Item Key="setting.forgotPasswordLinkOverride">ForgotPasswordExchange</Item>
        <Item Key="SignUpTarget">SignUpExchange</Item>
    </Metadata>
</TechnicalProfile>

Мои шаги оркестровки:

<OrchestrationStep Order="1" Type="GetClaims"
                                   CpimIssuerTechnicalProfileReferenceId="IdTokenHint_ExtractClaims"/>
<OrchestrationStep Order="2" Type="CombinedSignInAndSignUp"
                   ContentDefinitionReferenceId="api.signuporsignin">
    <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
            <Value>objectId</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
            <Value>signinOption</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
    </Preconditions>
    <ClaimsProviderSelections DisplayOption="ShowSingleProvider">
        <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange"/>
        <ClaimsProviderSelection TargetClaimsExchangeId="SignUpExchange"/>
        <ClaimsProviderSelection TargetClaimsExchangeId="ForgotPasswordExchange"/>
    </ClaimsProviderSelections>
    <ClaimsExchanges>
        <ClaimsExchange Id="LocalAccountSigninEmailExchange"
                        TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email"/>
    </ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="3" Type="ClaimsExchange">
    <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
            <Value>objectId</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
            <Value>signinOption</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
    </Preconditions>
    <ClaimsExchanges>
        <ClaimsExchange Id="SignUpExchange" TechnicalProfileReferenceId="SignUp"/>
        <ClaimsExchange Id="ForgotPasswordExchange" TechnicalProfileReferenceId="ForgotPassword"/>
    </ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="4" Type="InvokeSubJourney">
    <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
            <Value>objectId</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
        <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
            <Value>signinOption</Value>
            <Value>ForgotPassword</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
    </Preconditions>
    <JourneyList>
        <Candidate SubJourneyReferenceId="PasswordReset"/>
    </JourneyList>
</OrchestrationStep>
<OrchestrationStep Order="5" Type="InvokeSubJourney">
    <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
            <Value>objectId</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
        <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
            <Value>signinOption</Value>
            <Value>SignUp</Value>
            <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
    </Preconditions>
    <JourneyList>
        <Candidate SubJourneyReferenceId="SignUp"/>
    </JourneyList>
</OrchestrationStep>

И журнал User Journey:

[
  {
    "Kind": "Headers",
    "Content": {
      "UserJourneyRecorderEndpoint": "urn:journeyrecorder:applicationinsights",
      "CorrelationId": "7fcfa796-ecfe-43df-9e08-ec5317e1beb2",
      "EventInstance": "Event:AUTH",
      "TenantId": "mytenant.onmicrosoft.com",
      "PolicyId": "B2C_1A_Signin"
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "AUTH",
      "StateName": "Initial"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.NoOpHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "MACHSTATE": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "MACHSTATE",
          "v": "Initial",
          "p": true
        },
        "JC": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "JC",
          "v": "en",
          "p": true
        },
        "ComplexItems": "_MachineEventQ, TCTX"
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.OrchestrationManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "Complex-CLMS": {},
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "ORCH_CS",
          "v": "0",
          "p": true
        },
        "RA": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "RA",
          "v": "0",
          "p": true
        },
        "ComplexItems": "_MachineEventQ, TCTX, ORCH_IDX"
      }
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "PreStep",
      "StateName": "Initial"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.NoOpHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.PreSetupHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "RPP": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "RPP",
          "v": "OAUTH2",
          "p": true
        },
        "RPIPP": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "RPIPP",
          "v": "OAuth2ProtocolProvider",
          "p": true
        },
        "OTID": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "OTID",
          "v": "mytenant.onmicrosoft.com",
          "p": true
        },
        "APPMV": {
          "c": "2021-06-10T01:13:52.7375163Z",
          "k": "APPMV",
          "v": "V2",
          "p": true
        }
      }
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.InitiatingMessageValidationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": false,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "Validation",
            "Value": {
              "Values": [
                {
                  "Key": "SubmittedBy",
                  "Value": "Application"
                },
                {
                  "Key": "ProtocolProviderType",
                  "Value": "OpenIdConnectProtocolProvider"
                }
              ]
            }
          }
        ]
      },
      "Statebag": {
        "CT": {
          "c": "2021-06-10T01:13:52.8875243Z",
          "k": "CT",
          "v": "Spa",
          "p": true
        },
        "CC": {
          "c": "2021-06-10T01:13:52.8875243Z",
          "k": "CC",
          "v": "gIsVYH_0vVOTcxFUoYdb9oen4eq6Bfionj1djotzkQ4",
          "p": true
        },
        "CCM": {
          "c": "2021-06-10T01:13:52.8875243Z",
          "k": "CCM",
          "v": "S256",
          "p": true
        },
        "MSG(508dad2b-059e-4fb5-9719-f24c8d5360e8)": {
          "c": "2021-06-10T01:13:52.8925242Z",
          "k": "MSG(508dad2b-059e-4fb5-9719-f24c8d5360e8)",
          "v": "{\"TenantId\":\"mytenant.onmicrosoft.com\",\"PolicyId\":\"B2C_1A_Signin\",\"RedirectUri\":\"https://mywebsite.com.au/\",\"AdditionalParameters\":{\"client-request-id\":\"eb98add7-a02c-3312-a98c-b0f9c6ddeb15\",\"x-client-SKU\":\"msal.js.browser\",\"x-client-VER\":\"2.14.2\",\"x-client-OS\":\"\",\"x-client-CPU\":\"\",\"client_info\":\"1\",\"code_challenge\":\"gIsVYH_0wWOTcxFUoYdb9oen4eq6Bfionj1djotzkQ4\",\"code_challenge_method\":\"S256\"},\"Nonce\":\"41d42929-eabb-45a3-b0f2-743b89247a24\",\"State\":\"eyJpZCI6IjEwOGUyOWUzLTY3YzMtNGQ1OS05YmFkLTBkMWIwN2QyM2ZiOSIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicmVkaXJlY3QifX0=\",\"ClientId\":\"cb8678e1-0eee-4f6f-868a-72b968b0a8c0\",\"ResponseType\":\"code\",\"ResponseMode\":\"fragment\",\"ResponseRedirector\":{\"URI\":\"https://mywebsite.com.au\",\"D\":false,\"WF\":true},\"Scope\":\"https://mytenant.onmicrosoft.com/api/user.read openid profile offline_access\",\"AppModelVersion\":1,\"ScopedProviders\":[]}",
          "p": true,
          "t": "OAuth2"
        },
        "CMESSAGE": {
          "c": "2021-06-10T01:13:52.8925242Z",
          "k": "CMESSAGE",
          "v": "508dad2b-059e-4fb5-9719-f24c8d5360e8",
          "p": true
        },
        "IMESSAGE": {
          "c": "2021-06-10T01:13:52.8925242Z",
          "k": "IMESSAGE",
          "v": "508dad2b-059e-4fb5-9719-f24c8d5360e8",
          "p": true
        },
        "ComplexItems": "_MachineEventQ, TCTX, ORCH_IDX, REPRM, IC"
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.NoOpHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.SSO.ResetSSOSessionHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.ClientInputClaimsTransformationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.OrchestrationManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.9025365Z",
          "k": "ORCH_CS",
          "v": "1",
          "p": true
        }
      }
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "GetClaims",
      "StateName": "AwaitingNextStep"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.NoOpHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "MACHSTATE": {
          "c": "2021-06-10T01:13:52.9025365Z",
          "k": "MACHSTATE",
          "v": "AwaitingNextStep",
          "p": true
        }
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.GetRelyingPartyInputClaimsHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.OrchestrationManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.9025365Z",
          "k": "ORCH_CS",
          "v": "2",
          "p": true
        }
      }
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "CombinedSignInAndSignUp",
      "StateName": "AwaitingNextStep"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.SSO.IsSSOSessionParticipantHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.HomeRealmDiscoveryHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "HomeRealmDiscovery",
            "Value": {
              "Values": [
                {
                  "Key": "CurrentStep",
                  "Value": 2
                },
                {
                  "Key": "TechnicalProfileEnabled",
                  "Value": {
                    "EnabledRule": "Always",
                    "EnabledResult": true,
                    "TechnicalProfile": "SelfAsserted-LocalAccountSignin-Email"
                  }
                },
                {
                  "Key": "TechnicalProfileEnabled",
                  "Value": {
                    "EnabledRule": "Always",
                    "EnabledResult": true,
                    "TechnicalProfile": "SignUp"
                  }
                },
                {
                  "Key": "TechnicalProfileEnabled",
                  "Value": {
                    "EnabledRule": "Always",
                    "EnabledResult": true,
                    "TechnicalProfile": "ForgotPassword"
                  }
                }
              ]
            }
          }
        ]
      },
      "Statebag": {
        "TAGE": {
          "c": "2021-06-10T01:13:52.907517Z",
          "k": "TAGE",
          "v": "ForgotPasswordExchange",
          "p": true
        }
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.NoOpHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.SSO.SSOSessionHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.OrchestrationManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.907517Z",
          "k": "ORCH_CS",
          "v": "3",
          "p": true
        }
      }
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "ClaimsExchange",
      "StateName": "AwaitingNextStep"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.ShouldOrchestrationStepBeInvokedHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "EnabledForUserJourneysTrue",
            "Value": {
              "Values": [
                {
                  "Key": "CurrentStep",
                  "Value": 3
                },
                {
                  "Key": "TechnicalProfileEnabled",
                  "Value": {
                    "EnabledRule": "Always",
                    "EnabledResult": true,
                    "TechnicalProfile": "SignUp"
                  }
                },
                {
                  "Key": "TechnicalProfileEnabled",
                  "Value": {
                    "EnabledRule": "Always",
                    "EnabledResult": true,
                    "TechnicalProfile": "ForgotPassword"
                  }
                }
              ]
            }
          }
        ]
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsClaimsExchangeProtocolARedirectionHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsClaimsExchangeProtocolAnApiHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.SSO.IsSSOSessionParticipantHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsClaimsExchangeProtocolAServiceCallHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "InitiatingClaimsExchange",
            "Value": {
              "ProtocolType": "backend protocol",
              "TargetEntity": "ForgotPasswordExchange",
              "TechnicalProfileId": "ForgotPassword",
              "ProtocolProviderType": "ClaimsTransformationProtocolProvider"
            }
          }
        ]
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.GenerateRequestInputParamsHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": false
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.InputClaimsTransformationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.PersistedClaimsTransformationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.OutputClaimsTransformationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "GettingClaims",
            "Value": {
              "Values": [
                {
                  "Key": "InitiatingBackendClaimsExchange",
                  "Value": {
                    "TechnicalProfileId": "ForgotPassword",
                    "ProtocolProviderType": "ClaimsTransformationProtocolProvider"
                  }
                }
              ]
            }
          },
          {
            "Key": "OutputClaimsTransformation",
            "Value": {
              "Values": [
                {
                  "Key": "MappingDefaultValueForClaim",
                  "Value": {
                    "PartnerClaimType": "signinOption",
                    "PolicyClaimType": "signinOption"
                  }
                }
              ]
            }
          }
        ]
      },
      "Statebag": {
        "Complex-CLMS": {
          "signinOption": "ForgotPassword"
        }
      }
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.SSO.SSOSessionHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.OrchestrationManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.9125258Z",
          "k": "ORCH_CS",
          "v": "4",
          "p": true
        }
      }
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "InvokeSubJourney",
      "StateName": "AwaitingNextStep"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.NoOpHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.EnqueueNewJourneyHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "SubJourneyInvoked",
            "Value": "PasswordReset"
          }
        ]
      },
      "Statebag": {
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.9125258Z",
          "k": "ORCH_CS",
          "v": "0",
          "p": true
        },
        "ComplexItems": "_MachineEventQ, TCTX, ORCH_IDX, REPRM, IC, JL"
      }
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.OrchestrationManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ORCH_CS": {
          "c": "2021-06-10T01:13:52.9125258Z",
          "k": "ORCH_CS",
          "v": "1",
          "p": true
        }
      }
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "ClaimsExchange",
      "StateName": "AwaitingNextStep"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.ShouldOrchestrationStepBeInvokedHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "EnabledForUserJourneysTrue",
            "Value": {
              "Values": [
                {
                  "Key": "CurrentStep",
                  "Value": 1
                },
                {
                  "Key": "TechnicalProfileEnabled",
                  "Value": {
                    "EnabledRule": "Always",
                    "EnabledResult": true,
                    "TechnicalProfile": "LocalAccountDiscoveryUsingEmailAddress"
                  }
                }
              ]
            }
          }
        ]
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsClaimsExchangeProtocolARedirectionHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsClaimsExchangeProtocolAnApiHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "InitiatingClaimsExchange",
            "Value": {
              "ProtocolType": "Identity Experience Engine API",
              "TargetEntity": "ForgotPasswordExchange",
              "TechnicalProfileId": "LocalAccountDiscoveryUsingEmailAddress",
              "ProtocolProviderType": "SelfAssertedAttributeProvider"
            }
          }
        ]
      },
      "PredicateResult": "True"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.SwitchToApiOrchestrationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Transition",
    "Content": {
      "EventName": "SELFASSERTED",
      "StateName": "AwaitingNextStep"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.SSO.IsSSOSessionParticipantHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsSelfAssertedEmpty"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "PredicateResult": "False"
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.InputClaimsTransformationHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.ConvertToAttributeFieldHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ComplexItems": "_MachineEventQ, TCTX, ORCH_IDX, REPRM, IC, JL, SA_FIELDS"
      }
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.ApiLoadHandler"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "Statebag": {
        "ComplexItems": "_MachineEventQ, TCTX, ORCH_IDX, REPRM, IC, JL, SA_FIELDS, EID, UXRC, ARC"
      }
    }
  },
  {
    "Kind": "Action",
    "Content": "Web.TPEngine.Api.ApiUIManager"
  },
  {
    "Kind": "HandlerResult",
    "Content": {
      "Result": true,
      "RecorderRecord": {
        "Values": [
          {
            "Key": "ApiUiManagerInfo",
            "Value": {
              "Values": [
                {
                  "Key": "Language",
                  "Value": "..."
                },
                {
                  "Key": "Settings",
                  "Value": "..."
                }
              ]
            }
          }
        ]
      }
    }
  }
]


person darnmason    schedule 10.06.2021    source источник
comment
Кто-нибудь из Microsoft хочет помочь?   -  person darnmason    schedule 28.06.2021


Ответы (1)


Итак, методом проб и ошибок я нашел решение своей проблемы и думаю, что получил дополнительное понимание черного ящика, то есть настраиваемых политик B2C.

Я вычислил шаги воспроизведения, которые были:

  1. Во время моего входа в систему выберите «Зарегистрироваться или забыл пароль».
  2. Завершите регистрацию / сброс, чтобы снова войти в мое приложение.
  3. Закройте вкладку браузера.
  4. Снова запустите веб-приложение, MSAL перенаправит на B2C.
  5. Я попадаю в выбранный ранее поток, вернуться к экрану входа невозможно.

Решением моей проблемы было добавление <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD"/> в каждый технический профиль на всех этапах оркестровки. Это включает в себя ТП обмена утверждениями, которые я создал для обработки целей SignUpLink и Forgot Password.

Насколько я понимаю, B2C проходит через все этапы оркестровки, поскольку обнаруживает сеанс, он пропускает любой TP, использующий управление сеансом. В моем случае только шаг 2 SelfAsserted-LocalAccountSignin-Email имел управление сеансом, поэтому он был пропущен. Я могу только предположить, что выбранный ранее поставщик утверждений был сохранен и извлечен из сеанса, что заставило его действовать так, как если бы пользователь выбрал его снова.

Поскольку на следующих этапах не использовалось управление сеансом, они в конечном итоге были выполнены, и пользователь попадал либо на экран регистрации, либо на экране сброса пароля, в зависимости от того, какой поставщик утверждений был выбран ранее.

Если кто-то может расширить мое понимание или предложить более изысканное решение, я все уши.

person darnmason    schedule 28.06.2021