Creating a new user via Auth0 Management API associates user to API app and not Angular SPA app

Are you using a database connection to create users? Does the user ID look like this “auth0|123abc”?

im using email connection:

{
"email": "me@me.com",
"given_name": "fred",
"family_name": "fred",
"name": "fred fred",
"connection": "email",
"email_verified": true
}

I’m doing passwordless

I’ve figured out what’s happening. I’ve implemented passwordless connection. I didn’t realize I I have to change the ‘from’ email address to something other than auth0.com domain to implement the custom passwordless email template. I’ve modified it to the correct from email address (mail@my-domain-.com) and I’m now receiving the custom passwordless email template.

Auth0 should really include the passswordless custom template in the email template section.

Do you know how to force the passwordless email template to emit only a code? It’s sending a link for user to click.

2 questions:

  1. When I manually create user with ‘email’ connection (for passwordless), the email they receive contains a link for them to click. How do I force the email to generate a code instead?

  2. Can I send a passwordless verification email from Management API?

Thank you

I figured it out. I can create a user programmatically and set their email_verified to true which prevents the default passwordless email from being sent (because default uses link instead of code). I can then manually invoke the sending of the email and specify the passwordless uses a code as described here:

https://auth0.com/docs/api/authentication?http#passwordless

This is working via postman. I’ll try now with actual code.

1 Like

Great! I’m glad you found a solution. You can provide feedback about including the passwordless template with other templates here: Auth0: Secure access for everyone. But not just anyone.

Hi Stephanie. This did not work in code because the email that gets sent, passwordless start, is the wrong one to send in this context. I’m creating a new user, so the new user should be receiving a ‘welcome’ email for the Angular SPA app. The passwordless start email is a different context.

It’s very unfortunate that I cannot create a user via Auth0’s Management API and provide an application context so the correct welcome email is sent.

Do you know if I can programmatically send a welcome email and provide the correct application context?

So, right now this issue is still not resolved.

Thank you for your help.

1 Like

You could not send an email from auth0 at all and send a custom email from your email provider in a Post-Registration Hook. Here is an example: Auth0 Actions

Again, it would be great to get your feedback about extending the features around passwordless and the management API! Auth0: Secure access for everyone. But not just anyone.

Thanks for the link. I’ll look into it.

Yes, I provided feedback foor integrating Passwordless email template with the other email templates. Hopefully it will be accepted.

2 Likes

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