Redan
Lurker
Hi ,
I am quite new in using OAuth and third-party authentication.
I am building an Android application and i want to integrate "Login using Google" and "Login using Facebook" buttons.
I've already succeeded to retrieve user information (username,email,... ) from both Facebook and Google.
But i have two questions :
1. If a user has signed in using Google with the mail ABC@gmail.com - this mail then is added to the application database , then the same user tried to register with the same mail, and give it a password, what should the application do in this case ? ( Should i bring a "Email already exist" message ?, or just update that user in the application database to have the new entered password ? )
2. If a user has signed in using Google with the email address ABC@gmail.com - this mail is stored in the application database, then the same user tried to sign in using Facebook with the same email address , do i make a new record in the application database indicating the mail : ABC@gmail.com but this time with Facebook. Or i update the same user record ?
which method is proffered ?
I am quite new in using OAuth and third-party authentication.
I am building an Android application and i want to integrate "Login using Google" and "Login using Facebook" buttons.
I've already succeeded to retrieve user information (username,email,... ) from both Facebook and Google.
But i have two questions :
1. If a user has signed in using Google with the mail ABC@gmail.com - this mail then is added to the application database , then the same user tried to register with the same mail, and give it a password, what should the application do in this case ? ( Should i bring a "Email already exist" message ?, or just update that user in the application database to have the new entered password ? )
2. If a user has signed in using Google with the email address ABC@gmail.com - this mail is stored in the application database, then the same user tried to sign in using Facebook with the same email address , do i make a new record in the application database indicating the mail : ABC@gmail.com but this time with Facebook. Or i update the same user record ?
which method is proffered ?