This Connection has the Setup "Always set email_verified to ‘false’
In the advanced Tenant-Settings I enabled the flag: “Enable email verification flow during login for Azure AD and ADFS connections”
The result of this setup looks like this:
A new user in this connection starts with the email_verified-property set to “false”. During login he is forced to verify his email by entering a code, which is send by mail. Great, works as expected
Now I would like to customize the verification-mail to present it in the right language. It should be multilingual depending on the users preferences. I made this customization in a few other mail-templates in the past following the documentation: Customize Email Templates
The thing is, in the template “Verification Email (Code)” I only have access to the users mail-address. All other properties of the user (including meta_data) are unavailable. I checked this out by using the debug liquid template: {% debug %}
Is this a bug in the specific template or do I miss something completely?
Would be great to access the users other properties for example the preferred_language which is synced from Microsoft with the extended user profile. Otherwise I have no idea how to decide which language to use.
Thank you for posting regarding the issue you are having in implementing localization for you email templates.
The issue that you are describing seems to be a design issue in the flow since it was designed to run before user creation, that is why common variables that are available in other templates regarding the user cannot be used in this specific template. This oversight might take some time to solve / re-design and the fix might not come in the short term
Since other user properties such as the meta data also cannot be retrieved in order to implement some kind of localization of that specific template, you can attempt to retrieve the locale of the user by retrieving the {{ geoip.countryCode }} and then use localization depending on the region retrieving in that property.
Otherwise, Auth0 does not offer any other options for implementing localization in the email templates at this time, feel free to submit a Feature Request. This is a direct line to our Product team and the best way to communicate this type of request. However, it appears that we have documented this feature request internally and our Engineering team has been notified of the request. We will announce/let you know once we have any additional news on this matter.
If you have any extra questions, feel free to leave a reply on this post.
thank you for the information.
Maybe it is possible to update the documentation in the meanwhile, since “Common Variables” is kind of misleading for this template: Customize Email Templates