Currently, I am in the process of implementing the "forget password" feature. However, I have encountered an issue where I would like to verify the "verification code" first before setting a new "password". Unfortunately, the system currently requires both parameters - the new password and verification code - to be submitted at the same time for updating the password.
getUser(values.email).confirmPassword(values.code, values.password, {
onSuccess: (data) => {
console.log("onSuccess", data);
setStage(2);
},
onFailure: (data) => {
console.log("onFail", data);
return;
},
});
const getUser = (Username) => {
return new CognitoUser({ Username, Pool });
};