I have been experiencing this issue recently. I tried creating an user from both aws-cli and through javascript sdk.
Also I think this could be related to Cognito userpool on AWS console. But I have been using exact same settings and didn't get an error back then. I am attaching both cli command and my code snippet anyways
CLI command
aws cognito-idp sign-up --region us-east-1 --client-id <clientid> --username [email protected] --password Test@123 --user-attributes Name=email,[email protected]
Code snippet
login(username, password) {
const userPool = new CognitoUserPool({
UserPoolId: config.cognito.USER_POOL_ID,
ClientId: config.cognito.APP_CLIENT_ID
});
const authenticationData = {
Username: username,
Password: password
};
const user = new CognitoUser({ Username: username, Pool: userPool });
const authenticationDetails = new AuthenticationDetails(authenticationData);
return new Promise((resolve, reject) =>
user.authenticateUser(authenticationDetails, {
onSuccess: result => resolve(result.getIdToken().getJwtToken()),
onFailure: err => reject(err)
})
);
}
I had got the same after I had switched to link verification (instead of email confirmation code). I had never tried this feature so it's either cognito or I need to change something in my client code.
P.S. If I use confirmation code instead of link confirmation - works fine.
I also had the same issue. I cant find anything regarding a linkParameter or anything like that.. I imagine you have to build that yourself with EC2 and SES .... but I cant find anything about doing that either...
I created a subdomain in the Cognito config and and the user pool error went away but then I got a InvalidParameterException: The message is empty. error.
I can confirm what @YaroslavHavrylovych said about code confirmation is true.
I just saw this...
https://github.com/aws/amazon-cognito-identity-js/issues/62
Solution is here: https://forums.aws.amazon.com/thread.jspa?threadID=262811
"you need to setup a domain in the App Integration tab"
@wordyallen it looks like @ecejas suggestion fits (type a domain name in the App Integration tab), and it's working. I got few success registrations and logins, and a few which failed. Again I'm not sure what is the reason of fails, maybe other issues. But imho it better to default solution instead of a hand-made.
P.S. my bad, I've updated library (android) and issues gone, registration and login seems fine. Maybe it's a good time to close the issue.
Most helpful comment
Solution is here: https://forums.aws.amazon.com/thread.jspa?threadID=262811
"you need to setup a domain in the App Integration tab"