Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom auth lambda trigger not configured

I am trying to achieve a classical login/register with react and amplify. I don't want to use the amplify-react components but only the Auth methods from amplify.

I also want to auto-confirm the users so I plugged a pre-signup lambda function. Everything is working but I still have this error.

I have tried to unplugged my custom lambda function without any effect.

Here is my function:

  handleClick = async () => {
    try {
      await Auth.signUp({
        username: this.state.username,
        password: this.state.password,
        attributes: {
          email: this.state.email,
        },
      });
      await Auth.signIn({ username: this.state.username, password: this.props.password });
    } catch (err) {
      console.error(err);
    }
  };

The error is triggered by the call to signIn after signUp

enter image description here

Does anyone know what this error message means ?

like image 937
Ernest Jones Avatar asked Oct 22 '25 08:10

Ernest Jones


1 Answers

You must provide the required attributes, username (non-empty) and password (can non-empty) Make sure the username and password variables are not empty (e.g: null or '').

like image 95
Manmay Barot Avatar answered Oct 26 '25 16:10

Manmay Barot