Last Updated: Aug 2, 2024
Overview
Sendgrid was enabled as the custom email provider. It was noticed that in all verification emails, the {{ url }} value is being generated as http://url4955.[CUSTOMER_DOMAIN].com/ls/click?upn=[…]. The link should be https://[AUTH0_DOMAIN]/u/email-verification?ticket=[TICKET_ID]
Applies To
- Custom Email Provider
- Sendgrid
- Verification Email
Cause
SendGrid offers a feature called Click Tracking, which allows customers to track when links are clicked in an email. When this feature is enabled, SendGrid scans the outgoing emails and replaces the links with a link generated by SendGrid.
For example, the below link in the email:
<a href="http://my_link"" Please Click Here</a>
will be replaced with:
<a href="https://u9946203.ct.sendgrid.net/wf/click?upn=nDeVIc0FUsgX2zv"" Please Click Here</a>
Solution
Disable Click Tracking on the SendGrid side, as described in this document.
If turning off Click Tracking in SendGrid settings is not an option, then use the clicktracking=off attribute in the Auth0 email templates. Simply add the attribute to any links in the auth0 email templates that should not be tracked.
<a clicktracking=off href="http://my_link" Please Click Here</a>
The change is easy to make and will give the best of both worlds. It is possible to keep Click Tracking enabled for any email campaigns that are running and ensure that SendGrid does not change the outgoing email links when sending an email from Auth0 using an email template.