Problem statement
A ‘white label’ product for a customer’s own “downstream” business customers is in development.
A requirement exists to use Passwordless email to deliver a greeting, such as “Here’s your code to log into {businessName}”, where ‘businessName’ is dynamic.
The current workaround is to store the value of ‘businessName’ inside app_metadata, which can be read from the email template. However, a fresh use case has emerged where an end user can be part of multiple businesses. Now the strategy of storing the value of ‘businessName’ inside app_metadata no longer makes sense because the user identity may be associated with two or more different businesses.
However, the value of ‘businessName’ can be determined at the moment when the user attempts to log in.
Is it possible to pass the value of ‘businessName’ to the Passwordless email, in order to present the user with a greeting?
Solution
At the present moment, there is no way to pass custom parameters into the Passwordless email template. Customers who would like to see this facility in a future release of Auth0 are recommended to submit a feature request via our Customer Feedback page. All such requests will be reviewed and prioritized by the Product team.
Email templates support a range of customization options which are adequate for the majority of use cases. For more information, refer to:
As an alternative to reliance on storing data such as ‘businessName’ inside app_metadata for B2B customers, it is worth exploring the capabilities of Organizations. For further information, refer to Auth0 Organizations. This feature set is specifically designed to handle these types of business use cases. Organization variables are accessible in many email templates, which offer a way to customize emails and login pages specific to B2B customers.
However, this would not be a complete solution in this particular case, as Organization variables are not accessible within Passwordless email templates (since corporations tend to use enterprise connections). But for other types of scenarios, Organizations do offer a rich set of features to support sophisticated B2B solutions.