Amplify-js: two issues: InvalidLambdaResponseException for email link verification and Auth.forgotPasswordSubmit

Created on 10 Oct 2019  路  3Comments  路  Source: aws-amplify/amplify-js

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

  1. go to console
  2. select email link verification
  3. try amazon subdomain or your own domain, same results.
  4. there was also a bug with code verification so I switched back to link verification.

for change password

  1. implement amplify code and get a response.
    here's my function implementation
  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):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

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._

Auth React pending-close-response-required to-be-reproduced

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karlmosenbacher picture karlmosenbacher  路  3Comments

callmekatootie picture callmekatootie  路  3Comments

guanzo picture guanzo  路  3Comments

cgarvis picture cgarvis  路  3Comments

shinnapatthesix picture shinnapatthesix  路  3Comments