Cognito verification sends code instead of link

1

I'm using Cognito for User Management and I would like to build user journey where admin can edit user's email and then the user can verify the changes by clicking on an verification link received in email.

So far, I can only manage to send an email with a verification code, not a link, no matter if I have 'Verification type' 'Code' or 'Link' selected, a verification code is sent either way.

I am using my own domain, which has a an AWS managed certificate in US East (N.Virginia). I have also added the alias target in Route 53.

Can anyone spot what I am missing?

2 Answers
-1

It sounds like you have set up your Cognito user pool to send verification codes rather than links. To send a verification link instead of a code, you'll need to make sure that you have selected 'Link' as the 'Verification type' in your user pool settings. You'll also need to ensure that your custom email domain is correctly configured with your user pool. This includes:

  • Verifying your email domain in Amazon SES
  • Adding the appropriate MX records and SPF records for your email domain
  • Adding a CNAME record for your email domain in Route 53, pointing to the appropriate Amazon SES email identity

Additionally, you should check that your AWS Managed Certificate has been added to the CloudFront distribution of your custom email domain and that your DNS records are correctly propagated.

It may be helpful to check if you have missed any Cognito Email Verification documentation steps.

answered a year ago
-1

Cognito supports both email and phone verification for verifying users. You can choose settings for email or phone verification under the Messaging tab. You can choose a Verification type of "Code" or "Link" when you edit your Verification message template in the Messaging tab of the Amazon Cognito console.

To customize the email subject and message content for email address verification messages, edit the Verification message template in the Messaging tab of your user pool.

When you choose Link as the verification type, your custom message must include a placeholder in the format {##Verify Your Email##}. You can change the text string between the placeholder characters, for example {##Click here##}. A verification link titled Verify Your Email replaces this placeholder.

The link for an email verification message directs your user to a URL like the following example.

https://<your user pool domain>/confirmUser/?client_id=abcdefg12345678&user_name=emailtest&confirmation_code=123456

Refer the document to customize the message template - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-email-verification-message-customization.html

AWS
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions