3

I'm trying to configure AWS Cognito to send a verification email containing a custom one-click link. Following this guide I created this link into my template:

<a href="https://www.example.com/verify/{username}/{####}">Click on the link</a>

Since {username} is a valid template token, I expected it to be changed into the actual username when a verification email is sent, but it's not. I also tried a couple of advanced tokens, like {ip-address} and {country}, without success. What am I missing here?

Edit: I'm trying this on eu-central-1, verification type is code and here's a screenshot from the AWS Console:

1 Answers1

5

Not all given message template placeholders work for all custom message workflows. For instance, email verification I couldn't make any placeholder work but verification code {####}. It is not mentioned in AWS documentation though but that's my experience.

I managed to achieve it using Lambda custom message triggers. Much easier to implement and provide a lot more customisation options.

A.Khan
  • 3,826
  • 21
  • 25
  • Yes, I will give it a try. It's somehow irritating that it's wrongly documented, but at least I know that I didn't miss anything. Thanks for the feedback! – Alessandro Cappello Jan 22 '19 at 16:54