Auth0 - Inviting Users & Forgot Password collision

Hello!

Recently I implemented a functionality of inviting users where they are prompted to change their passwords after I create their profile. The flow:

  1. Create new user in Auth0
  2. Post-registration hook is triggered - an email is sent to this user with a link for changing his password.
  3. The email template is “Change Password” and it is customized in a way that represents “User Invitation”. (I am using SendGrid as email provider)

That works fantastic, BUT I realized that when I click “Forgot Password?” with a user that is already registered it is using the same template that I modified in order to simulate the invitation explained above.

I was wondering is there any way that I can create multiple templates for resetting password and respectively switch them depending on the case?

Are there any other solutions that might fit to my case? The thing is that I have to use this simulation of user invitation because when I create the user I have to setup various metadata properties.

Any suggestions would be appreciated,
Thank you!

Hello @lyubomir.nikov,

There is only one template for each type of template, but content can be customized or “programmed” using liquid syntax. In this way you can alter the content of the email based on various conditions including user profile attributes.

Mark

2 Likes