How is one to create a new user with some password options

Heyya hey folks, not necessarily new to Auth0, but certainly a bit new to using the API itself within my applications. Im having trouble with something and would like any input to the question I can here.

So the goal is this: A user submits a request to join an event. An admin, seeing this request, can approve them for that event, which is meant to post a new Auth0 client login for them based on their provided email.

What I’d like to have happen, is that once the user is created, it is created without a password, but upon getting the email, it either A) Gives a pregenerated password, or B) Asks them to create a password.

How would something like this be achieved do you recon?

Hi @TheMemelyMan,

Welcome to the Community! You could create the user with a throwaway randomly generated password, and send the user a modified “password reset” email. I do this whenever I need to manually create a user, e.g., if they don’t fit our usual account creation / onboarding flows. I just generate a random password for the account, and I don’t store it anywhere.

You can disguise the password reset page as a “set password” page instead, which is what we do.

Ah! I wasnt aware you were able to send users emails from Auth0 with their credentials? Where would the documentation on that be, if I could ask?

You don’t need to send them credentials. You can use the API to create a password reset link for them:

Send them a welcome email with that link, they click the link, set their password.

1 Like

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