Passing additional parameters to passwordless email

I have a B2B2C use case where I’m providing a white label product for end customers. When it comes to the passwordless email, that means we need some language “Here’s you code to log into {businessName}”, where programName is dynamic.

I can’t find a way to pass businessName to the email. Our current workaround is to store it inside app_metadata, which can be read from the email template. However, we’re running into a use case where an end user can be part of multiple businesses, and storing it on app_metadata no longer works, because we do not know which business is logging in for. We do however know which business they’re logging in for at the time of login. So it would be helpful is we could pass this as a parameter to the email somehow.

Any help is appreciated.

Hi @daniel12

Welcome back to Auth0 Community.

My understanding is that we cannot currently pass arbitrary parameters into the passwordless email template but we can use what is already available, see here for possibilities https://auth0.com/docs/customize/email/email-templates/email-template-descriptions

I think given your use case, it might be worth looking into Organisations as this works well with the B2B scenario. You can configure passwordless with the New Universal Login quite easily https://auth0.com/docs/authenticate/passwordless/passwordless-with-new-universal-login#enable-passwordless-for-new-universal-login I believe this is a requirement to use Organizations.

Once the above is configured, users will login in the context of an organisation and this will give you the ability to pull in the organisation name into your email template from within the email passwordless connection like so:

Which produces:

I hope this helps you.

Warm regards.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.