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