Describe the bug
A clear and concise description of what the bug is.
As described in the title, implementing both of these amplify cognito functions results in the response above:
Invalid lambda function output : Invalid JSON
To Reproduce
Steps to reproduce the behavior:
for cognito
for change password
submitForgotPasswordNewPasswordForm = async ({
code,
password,
email,
}) => {
try {
console.log(code, password, email, ' this is code and password');
const data = await Auth.forgotPasswordSubmit(email, code, password);
console.log(data, ' data after password resetting.');
this.setState({
success: {
Header: 'Password reset successfully',
Content: 'Your password was successfully reset. You may go back to login to enter new password',
},
error: null,
});
} catch (e) {
this.setState({
error: {
Header: 'Something went wrong',
Content: `Please try again a few times. If still doesn't work then we will be happy to help. Here's the bug: ${e && e.message ? e.message : e}`,
},
success: null,
});
console.error(e, ' something went wrong with password reset.');
}
}
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Sample code
Include additional sample code or a sample repository to help us reproduce the issue. (Be sure to remove any sensitive data)
_You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app._
I'm having the same issue. Auth.forgotPasswordSubmit
@rush86999 @jbaldaraje Which lambda triggers have you implemented, and did you create them with the Amplify CLI?
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.