I’m implementing a password reset flow using AWS Cognito.
Desired Flow:
1. User requests a password reset; Cognito sends a verification code.
2. User verifies the code, then transitions to a new screen to set a new password.
3. User sets the new password.
Problem:
Cognito seems to require both the verification code and new password in the same request. Does anyone have a creative way to separate these steps to improve the user experience?
What I don’t want:
1. Transitioning the user to the new password screen without verifying the code.
2. Verifying the code with a random password and then again with the user’s new password (since the Cognito verification code is one-time use).
I tried separating the code verification and password reset steps by first verifying the code independently. I expected to be able to transition the user to a new screen for password input after successful verification. However, Cognito requires the verification code and new password to be submitted together, preventing the separation of these steps. This results in a challenge to implement a smooth, two-step user experience.
Ron Tsarum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.