6

I'm using cognito user pools for user management and using the flow of forgotPassword a confirmation code is sent to the user. For UI purposes I need to validate the code that is sent when I call the API ForgotPassword without sending the new password yet. I need like a middle step between ForgotPassword and ConfirmForgotPassword.

The function below is the one sending the code:

Auth.forgotPassword(username)

This function is resetting the password with the code sent (here I'm notified if the code is invalid)

Auth.forgotPasswordSubmit(username, code, new_password)

Is it possible to only validate the code sent with the existing API's available?

Here a link with information: https://docs.amplify.aws/lib/auth/manageusers/q/platform/js#forgot-password

JoaquinXCP
  • 71
  • 4
  • Did you ever work this out? I am currently searching for the same answer. Is there a way to get it to verify all fields and return all errors at once, and just send an empty string for the password? – thomasters Nov 16 '22 at 11:58
  • I couldn't find a way to do it. I ended up collecting in the UI the two parameters required code and the new password with a stepper component, then I called the API with all the required parameters. – JoaquinXCP Jun 13 '23 at 16:09

0 Answers0