Hello, I’ve inherited an Auth0 setup, and everything is working fine (phew!).
I’m trying to change some text in one of the emails that gets sent out (at this point I can’t determine if it’s the Welcome Email or the Verification Email (using code)).
I’ve looked through every template and none of the code/text matches what I actually receive via email, so I’m not sure where to make the edits.
We have a custom email provider (SMTP using Amazon SES) but there are no templates or anything in there, just the smtp settings/credentials.
Is there anywhere else I can look inside Auth0 to find the code that actually gets sent out, so I can make my changes?
Is there any link added to this email? If yes, where does the link bring the user to? Can you please share a screenshot of the screen a user is brought to after clicking the link?
(This should help us identify what email template we talk about )
PS: One thing to keep in mind is not to share domains/callbacks/… here (security )
Hey @marcelina.barycka , thanks for the quick reply. Unfortunately the only link in the email is a link to our support email.
Since writing this, I ended up finding the template we created for this email. A few years ago we used Sendgrid to design our email, and then copy/pasted the HTML into Auth0 (or at least that’s where I think it went). I found the template in Sendgrid last night, and it looks identical to the email that gets delivered for the production tenant when a user is trying to log in.
That’s as far as I’ve gotten What else can I provide to help?
That’s a good clue - with a custom email provider configured, there is an option to customize email templates, also using a liquid syntax via our Management API (a liquid syntax allows using common variables to send email templates in the context of a specific user / application / etc.)
Alright! If you can’t localize this template code in the Auth0 dashboard → Branding → [Choose a specific template] → Message window, let’s please try fetching all customized email templates via the Management API: Auth0 Management API v2
PS: You should get 404 if a specific email template has not been customized.
The person who I inherited this project from couldn’t remember the details, but he did remember that “it’s really buried” so I think we’re on the right path
I followed these instructions to set up a temporary token that I could then use in the Auth0 Management API v2 link that you sent. After trying with all 3 tenants, the only one I received a 200 response from was the Blocked Account email. That’s a start.
If I wanted to alter that code, how would I go about doing that?
And what’s left for me to look into regarding the verify_email_by_code template?
Many of Auth0’s email templates are disabled for your tenants. (Disabling templates can be done via our Management API by setting the body param enabled to false.)
I believe this Auth0’s welcome email template that we’re investigating here is also disabled and what is sent to the user is managed by your email provider (and it makes me wonder if your email provider is responsible for storing the relevant template? )
In the case of Blocked Account Email template (and any other email template available in the Auth0 dashboard), you can use:
a) our GUI and the respective Message window to paste/incorporate changes (you will not see any text cursor, but you can make edits there, save them, and test).
I think I’m actually looking at the verifcation_with_code template, not the welcome template. The email I’m trying to adjust sends the 6 digit authentication code that a user will need to log in to our site. If our email provider is in fact storing the template, is Auth0 able to send that code via API so it can be dynamically inserted into the email? If so, is there a way to see what call it’s making and what template it’s instructing that code to be sent to?
That being said, it seems unlikely that our email provider (AWS SES) is storing anything, I’ve already investigated SES and there’s nothing in there that’s interesting, other than us enabling SMTP credentials (which are then stored in Auth0).
While using the Management API, I also noticed that every template (other than the Blocked Account Email in our Production tenant) is disabled in our Tenants. If that’s the case, and if the verification_with_code template is coming back 404 from the Management API, BUT we are in fact getting the email, where else can we look? The template in Branding > Email Templates is totally different than what’s getting delivered so I know that screen is a dead end.
Our staging tenant is actually using the Auth0 Email Provider, so maybe that’s an easier place to start. Since Auth0 is definitely doing the sending for this template, perhaps this is an easier place to look. The email looks like a vanilla Auth0 email, but the code in the verficiation_with_code email template in Branding > Email Templates is not what’s getting sent out. On top of that, the Management API returns 404 to that template, so I’m just at a loss for where that code is being stored.
Why is there an email template buried in this Passwordless setting when the Branding > Email Templates and the Management API both support templates for “verification_email_with_code”? This is absolutely not intuitive. I’ve visited the Passwordless screen before, but it didn’t look like I could do anything other than toggle off/on 2 different settings between SMS and email. Which brings me to my second point:
How on earth is a user supposed to know that the two SMS and Email boxes are clickable? There’s no indication, and the idea that you’d have a radio toggle that also serves as a button to configure? I’m completely baffled, and wasted a solid week because of this poor UI. If your team had simply put a “Configure” label underneath “Email” it would have been obvious and crystal clear. This type of resolution is really frustrating, because it never needed to be this big of an issue if the UI had been more thoughtful.
That’s my feedback for your team I appreciate your support and guidance - I learned a few things along the way too, so thank you.