Custom auth0 Log In/Sign Up flow

Hello

I was wondering how can I implement User Signup and User Login directly from my login/register forms.
(for example)

The Sign Up flow is as follows:
User inputs the following:

  • username
  • email
  • password
  • confirm password

I take that payload as an object and send it somewhere with some API to auth0 to register the user, next an email will be sent for email verification. At that points in time the user will already be able to login.

The Log In flow is as follows:
User inputs the following:

  • username or email
  • password

I take that payload as an object and send it somewhere with some API to auth0 to login the user, a JWT will be returned.

I have searched the auth0 documentation but haven’t found a reference or maybe i just passed right through it.

I am not asking for someone to do my work… I’m just asking for a kick to the right direction and documentation.

Thanks for the help/references!

Hi @gmwill934,

Check out the resource owner password flow:

We don’t typically recommend it right off the bat because it requires an application to handle the user’s password, but it will do what you are describing.

This will allow you to directly exchange a email/pw pair for a token.

In order to sign up a user, you can use the signup endpoint:

Thanks @dan.woda !!

I see that the signup endpoint ( /dbconnections/signup) for the Authentication API is only available for enterprise plans, so I’ll have to work out another solution.

What about a login/signup ‘pop up widget’ that I can customize 100% for my brand.

What documentation should I be looking to?

@gmwill934,

Can you tell me where you are seeing this? I don’t remember this being the case, but things do change on a rare occasion.

here it is.

it says ‘This endpoint only works for database connections.

But… maybe I am wrong and I am confusing myself with the Custom Database option? (which is only available for enterprise plans)

1 Like

Ah yes, that is if you are hosting your own DB. If you are using an auth0 DB connection then you should be able to use the signup endpoint at any subscription tier, including free.

Thanks! Just one more question @dan.woda :slight_smile:

So about my second option =>

What about a login/signup ‘pop up widget’ that I can customize 100% for my brand.

What documentation should I be looking to?

Where can I find documentation for that, i’d like to have two options.

You can customize the Auth0 hosted login page to match your site’s UI. I would recommend this over the resource owner password grant (sending a username/pw via API).

Checkout the doc for Classic UL:

If you go to your dashboard -> universal login -> login -> default templates -> custom login form you can customize the html and css there.

1 Like

@dan.woda you’ve been the best. thank you so much!

1 Like

Please let us know if you have any other questions!

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