'Aws Cognito new user sign up got stuck when fail to enter verification code
I'm using Cognito hosted UI to allow new user to sign up and require new sign up to enter confirmation code sent via email. However, if the user failed to enter the confirmation code and close off the hosted ui, the sign up flow will get stuck (as reported here). The new user will not be able to sign-in or sign-up again because the user is created in cognito in unconfirm status.
Any advice?
Solution 1:[1]
You probably have already found the solution, but I am leaving this for future visitors looking for the answer.
Recently Amazon Cognito has started supporting the verification link as well with custom message template. Unlike verification code, the users won't be stuck if the window is closed as they can always click the link from the email.
You can choose verification by email and under "Message Customization", use "Link" for "Verification Type". In your message template, you can use the placeholder {##Click Here##} for the actual link.
If you are using terraform you can use this resource which would look something like:
verification_message_template {
default_email_option = "CONFIRM_WITH_LINK"
email_subject_by_link = "Verify your account"
email_message_by_link = <<EOF
Hello,<br/><br/>
Thank you for signing up.<br/><br/>
<strong>Here is your Verification Link: {##Click Here##}.</strong><br/><br/>
Thanks,<br/>
EOF
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | wildnux |
