I am sending Cognito Verification Link with a message that have HTML Tags.
I am trying to send the codeParameter inside a custom button:
<div align="center" class="button-container center" style="padding-right:5px;padding-left:5px;padding-top:15px;padding-bottom:15px">
<a href="{####}" target="_blank" style="display:block;text-decoration:none;-webkit-text-size-adjust:none;text-align:center;color:#323232;background-color:#ffc400;border-radius:25px;-webkit-border-radius:25px;-moz-border-radius:25px;max-width:210px;width:160px;width:auto;border-top:0 solid transparent;border-right:0 solid transparent;border-bottom:0 solid transparent;border-left:0 solid transparent;padding-top:5px;padding-right:25px;padding-bottom:5px;padding-left:25px;font-family:'Droid Serif',Georgia,Times,'Times New Roman',serif;mso-border-alt:none">
<span style="font-size:16px;line-height:32px">Verify your email</span>
</a>
</div>
But It sends this to me:
x-webdoc://9166B278-3889-4E59-A9E2-F88FD6970944/%7B##</a>
Instead of a link like this:
https://xxxxx.auth.us-east-2.amazoncognito.com/confirmUser?client_id=xxxxxxxxxxxxxxx&user_name=marcuspdg22&confirmation_code=244905
I had the same problem. Here are some tips that worked for me:
<body></body>
'https://{yourUserPoolDomain/confirmUser?client_id={yourClientId}&user_name=' + event.userName + '&confirmation_code=' + event.request.codeParameter
You can put this confirmation link inside a href
tag. Let me know if it worked for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With