Auth0 Home Blog Docs

Disable Social Signup..except for Linking existing account

I installed the Account Link extension which enables to link existing Database accounts to Social or Enterprise accounts. This works very well. I have disabled Sign up for database accounts so I can manually Create Users only from dashboard, then I can attempt to login with an existing Social Login (in this case only Google) or a configured Enterprise login ( Microsoft Azure AD) and right away is asked to link them.

The problem is when I try to Login with Social Login (Google) is created a user in Auth0 dashboard that allows it to get in, since there’s no registered user also there is no link account screen. I don’t want that, no google login should be allowed if there is no existing Database account related first.

I thought that a ‘Disable Social Sign ups’ rule was the choice, but after enabling it I’m not able to link it with a existing email! It’s denying any attempt to Login with Google, registered or not.

How can I set a rule to allow registered Database users to link their accounts to google seamlessly ?

Have you found a solution to this? I have the exact same situation.

I would use a different approach here:

Let them register with Facebook first, but then check within a rule if they already have another identity for a database connection, and if not, redirect them to a page where you require them to set a password, upon which you would then create and link that user in the database connection via a call to the Management API.

(Initially I had the idea to use a pre-user-registration hook and check if the user has an existing account under his email address in a database connection, but unfortunately the hooks only work for database connection signups, not for social signups - so that wouldn’t be triggered when using sign up with Facebook.)