7
votes

While creating user in userpool, user invitation messages are sent with a temporary password but email verification messages is not being sent.
I was creating a very simple setup to try out aws cognito service. Here is what I did in AWS cognito, I created a user pool with step by step as follows:
1)What do you want to name your user pool?
-> testpool

2)How do you want to create your user pool?
-> step through settings

3)How do you want your end users to sign in?
->Email address or phone number-Allow email addresses

4)What password strength do you want to require?
->Minimum length=6

5)Do you want to allow users to sign themselves up?
->Allow users to sign themselves up

6)How quickly should user accounts created by administrators expire if not used?
->Days to expire-7

7)Do you want to enable Multi-Factor Authentication (MFA)?
->off

8)Do you want to require verification of emails or phone numbers?
->Email

9)You must provide a role to allow Amazon Cognito to send SMS messages
->testpool-SMS-Role

10)Do you want to customize your email verification messages?
->Verification type-link
->Email subject = Your verification link
->Email message = Please click the link below to verify your email address. {##Verify Email##}

11)Do you want to customize your user invitation messages?
->SMS message = Your username is {username} and temporary password is ->{####}.
->Email subject = Your temporary password
->Email message = Your username is {username} and temporary password is {####}.

12)Do you want to customize your email address?
->no

13)Do you want to add tags for this user pool?
->no

14)Do you want to remember your user's devices?
->no

15)Which app clients will have access to this user pool?
->none(will simulate from create user option in genral setting-user and group)

16)Do you want to customize workflows with triggers?
->no

17)Review page - this page shows summary of whatever I selected Create pool

Now after pool creation went ot genral setting-user and group and clicked create user A Create user pop-up shows:
Username (Required): myEmailAddress
Send an invitation to this new user?: check
Temporary password: left blank
Phone Number: empty(not required)
Mark phone number as verified? unCheck
Email: myEmailAddress
Mark email as verified? unCheck
Click on Create User

A mail is received into my account form [email protected] via amazonses.com,
with subject: Your temporary password
with message as: Your username is [email protected] and temporary password is agsjyk.
This is okay.

But I didnot receive any verification mail link before previous mail.

4

4 Answers

10
votes

Not sure if you're missing this particular setup....Domain name is require for link verification. Under "Tab integration" then "Domain name"

2
votes

A mail is received into my account form [email protected] via
amazonses.com, with subject: Your temporary password with message as: Your username is [email protected] and temporary password is > agsjyk.

Looking at this it seems you are creating the user via the Cognito API by the AdminCreateUser method, and that's why you are receiving a temporary password.

The confirmation email you are expecting will only be sent if the user registers itself, so you should use the SignUp method.

1
votes

verification mail link is for when users sign themselves up, they will receive a link to ask them to verify the email address instead of a code. In your case, you are send a temporary password to the user, so the link wont show up.

1
votes

You need to add a domain in this section of the Incognito Service:

enter image description here

Also, if you are not getting the email, click on the user, and check their email, it could be wrong.

enter image description here