I get the above error from the following, even though the code eventually works and the user is created.
var poolData = {
UserPoolId : 'us-east-1_mrk4RyjYz', // Your user pool id here
ClientId : '6upe6ndundkv7f5i9jlo6a8p2t' // Your client id here
};
var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var attributeList = [];
var dataEmail = {
Name : 'email',
Value : values.email
};
var attributeEmail = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserAttribute(dataEmail);
attributeList.push(attributeEmail);
userPool.signUp(values.email, values.password, attributeList, null, function(err, result){
if (err) {
alert(err);
return;
}
cognitoUser = result.user;
console.log('User name is ' + cognitoUser.getUsername());
});
});
})
})
I get the above error from the following, even though the code eventually works and the user is created.