Make mobile numbers unique - prevent users with same mobile to sign up again

Hi all,

I would like to make users unique based on their mobile number. This should prevent creating fake accounts in my application.

Can I do this within Auth0 Hooks / Rules?

Technically if you only allow users to login through a passwordless SMS connection (https://auth0.com/docs/connections/passwordless/guides/sms-otp) you have achieved your requirement implicitly. If you need to allow other means of login, you could still technically use this connection and account linking to ensure each user has a verified mobile number.

I need both. E-Mail and Mobile. How does this account linking work?

Can this give the user an error if he tries to sign up a second time with same mobile but different email?

There’s reference information on account linking at (https://auth0.com/docs/link-accounts). Although it would require custom logic on your side to ensure each account has an associated SMS passwordless account it is technically feasible for you to perform a custom integration where a user after signing up with email are forced to also a mobile number (SMS account).

I ended up implementing my own solution. That hast the benefit that I can let the user login with his email and later ask him for his mobile number.

I might link it to auth0 later.

1 Like

Thanks for letting us know!