How to restrict sign ups for certain users

Hello @bhushan.chaudhari,

I would suggest having another look at the pre user registration hook. It should do what you want. We use a pre-reg hook to look up a new user’s chosen username in a legacy user database, in order to prevent the new user from choosing a username already in use by a legacy user who has not yet been migrated into our Auth0 database. This works as expected and the new user is required to chose a new username and no account is created until they do so.

This was the solution that we implemented with the assistance and at the recommendation of Auth0 Professional Services.

1 Like