samples icon indicating copy to clipboard operation
samples copied to clipboard

ForgotPasswordExchange condition check

Open apaulme opened this issue 5 years ago • 4 comments

i used the sample policy and noticed step 7 is getting executed all the time since isForgotPassword is default to true, so i changed the condition to check if user signed in with correct password we set the authenticationSource as localAccountAuthentication. if use that it will skip forgot password journey. please let me know what you think?

objectId SkipThisOrchestrationStep
            <OrchestrationStep Order="7" Type="ClaimsExchange">
                <Preconditions>
                    <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                    <Value>authenticationSource</Value>
                    <Action>SkipThisOrchestrationStep</Action>
                    </Precondition>
                </Preconditions>
                <ClaimsExchanges>
                    <ClaimsExchange Id="ForgotPasswordExchange" TechnicalProfileReferenceId="ForgotPassword" />
                </ClaimsExchanges>
            </OrchestrationStep>

apaulme avatar Apr 01 '21 22:04 apaulme

Which sample policy and for what scenario are you testing?

JasSuri avatar Apr 02 '21 22:04 JasSuri

this one https://github.com/azure-ad-b2c/samples/tree/c6bc40a998e4169034262909cdb54b8f46c3ee62/policies/embedded-password-reset

existing b2c user trying to reset password or just signing in

                    <Preconditions>
                        <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
                            <Value>objectId</Value>
                            <Action>SkipThisOrchestrationStep</Action>
                        </Precondition>                    
                        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
                        <Value>authenticationSource</Value>
                        <Action>SkipThisOrchestrationStep</Action>
                        </Precondition>

apaulme avatar Apr 05 '21 15:04 apaulme

I have it working now. I added 2 conditions to check for objectid and authentication source before calling forgot password technical profile.

On Wed, Apr 14, 2021, 2:36 PM Jas Suri @.***> wrote:

We took this doc down for now whilst we work on a fix for custom policy. It’s only working for user flow currently.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/azure-ad-b2c/samples/issues/205#issuecomment-819864855, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATP6ENOOAIOG73MCO4PCDCTTIYDHPANCNFSM42H4VPMQ .

apaulme avatar Apr 15 '21 00:04 apaulme

Experiencing the same issue.

francesconi avatar Jul 01 '21 11:07 francesconi