Restrict new-user signup

I’m looking to use Auth0 as a way for new users to sign up to my web app.
I don’t want to allow anyone to register for this, but only users that bought our hardware.
1 hardware system can have multiple users.

I was thinking of implementing it via a pre user registration hook.
Ideally, the user would register, then is prompted for the machine’s serial number, if the SN exists, then they are allowed to complete the registration process.

Is this possible to do with Auth0? And is there a repository of similar embedded functionality?

I think you are on the right track with Pre User Registration action.
If you are using universal login you want to add a new custom field to capture machine’s serial number.
This information will be available as user metadata later in the action code.

Next step is to call your own api from the action code to verify the machine’s serial number.
If it’s valid let user through, otherwise deny registration with an error.

Here is a gist on how to customise universal login to get machine’s serial number as part of user registration.

Read the full guide here for customising login form here.

And here is a sample action page imagining your use case. The code is not tested but should be close to what you need.

wow, pazel, thank you so much for this!

I’m gonna start playing around with this and let you know how it went