Preventing Facebook Social Login if email found
My site has two types of users a business and regular(non-business). The regular can also login via Facebook social login.
Consider the following flow: A business user registers first and then the same user goes to create a regular user account w Facebook Social login... this is the scenario I am trying to prevent.
I want to prevent this by checking the email and if this allready exists.
So consider this UX path and tell me what you think
- The Business User clicks the FB login button...the auth dialog appears.
- With FB.API call I get his email
- On clicking OK I make an ajax request and check for the e-mail in the DB.
- If found prevent registration and call FB.logout to log him out of FB.
Ideally i must check the email before the popup appearing...nonetheless I have not found a way getting the email from FB,API before a connection is made to FB...something that will inevitably bring up the dialogue...
What do you think?