Last post Dec 17, 2013 07:29 PM by Ruchira
Dec 15, 2013 11:53 PM|SamU|LINK
I'm interested in completely "outsourcing" the authentication business to Facebook and Google in my MVC 5 app. The part where I'm confused is this: I'm sure a lot of the users have both Facebook and Google accounts. How do I prevent duplicate user accounts
in my application for users who may first use Facebook then Google -- or vice versa -- to authenticate? If a user comes in and authenticates using Facebook, I create a user account for the user in my database. The next time he/she comes in and uses Google
authentication, how would I know that this user is already registered in my system and not create a new user account?
Dec 17, 2013 02:50 AM|Michelle Ge - MSFT|LINK
According to your description, my understanding is that: if the user has created an account in the google or the facebook, as the user want to login your application from google or facebook, we will check if the user is the first time to go to your application,
if yes, we will create an account for the user and save it in your DataBase. If not, we will prevent to create the user account.
So far as I know, in the google or facebook, we will register by the email.
If my understanding is correct, as the user login your application, we will get the user's email, if the email has existed in your DataBase, we will prevent to create account for this user.
Hope my description is useful for you.
Dec 17, 2013 07:29 PM|Ruchira|LINK
I'm sure a lot of the users have both Facebook and Google accounts. How do I prevent duplicate user accounts in my application for users who may first use Facebook then Google -- or vice versa -- to authenticate?
You can't. Those authentication works independantly and using seperate set of username/e-mail and password combination. There is no relation between the facebook authentication and the Google authentication.
Please 'Mark as Answer' if this post helps you