Reputation: 528
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:
Upvotes: 3
Views: 3399
Reputation: 3992
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.
Upvotes: 5