title: auto confirm users Cognito + Node JS
body: <p>I trying to auto confirm my users in cognito + node Js app.
  I tried this code as a Util, and here inside the function; and cant make it work</p>
  
  <p>I try to go to aws documentation but the code is ambiguous and doesn't explain to much.</p>
  
  <p>here is my code:</p>
  
  <pre><code>userPool.signUp(req.body.email, req.body.password, attributeList, 
  null, function (err, result) {
    event = {
      request: {
        "userAttributes": {
          "email": req.body.email
        },
        "validationData": {
          "Name": "email",
          "Value": req.body.email
        }
      },
      response: { 
        autoVerifyEmail: true
      }
    }
    // Confirm the user
  
    // Set the email as verified if it is in the request
    if (event.request.userAttributes.hasOwnProperty("email")) {
        event.response.autoVerifyEmail = 'true';
    }
  
    // Return to Amazon Cognito
    callback(null, event);
  
  if (err) {
    console.log("Error aws: ", err.message);
    // return;
  }
  cognitoUser = result.user;
  console.log('user name is ' + cognitoUser.getUsername());
  next();
  // return;
  });
  }
  </code></pre>
  
  <p>can anyone help me to say, what Im doing wrong?
  thanks</p>