Skip to content

Latest commit

 

History

History

pwd-reset-via-email-or-phone

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Password Reset - Via either Email or Phone verification

Demonstrate how to use a display control to conditionally process on the users decision to verify their account via Email or SMS verification code.

Live demo

To test the policy, follow these steps:

  1. If you don't have an account, create a local account with your email address, using the B2C_1A_Demo_SignUp_SignIn_PasswordReset_EmailOrPhone policy. This policy is based on the SocialAndLocalAccountsWithMfa that required users to register their phone number.
  2. Run the B2C_1A_Demo_PasswordReset_EmailOrPhone policy to reset the password.
  3. Perform the following test:
    1. Type your email and select Continue. Then, select to send the verification code to your email. Provide the verification code that you received and select continue to reset the password.
    2. Repeat the process, but this time select to send the verification code to your phone.

Prerequisites

How it works

  1. Read the users profile once they provide their email address. This will provide their phone number used to Sign Up.
  2. Use a displayControl to display the user a radio box selection on whether to verify their account via Email or Phone.
  3. The displayControl uses preconditions on the SendCode and VerifyCode actions to control the ValidationClaimsExchangeTechnicalProfile based on the users selection on whether to use phone or email to verify their account. That decision is held in the claim mfaType, which acts as the radio box.

Community Help and Support

Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [azure-ad-b2c]. If you find a bug in the sample, please raise the issue on GitHub Issues. To provide product feedback, visit the Azure Active Directory B2C Feedback page.

Notes

This sample policy is based on SocialAndLocalAccountsWithMFA starter pack. All changes are marked with Sample: comment inside the policy XML files. Make the necessary changes in the Sample action required sections.