How to Handle Facebook Logins with Same Usernames

0 votes
Hi, We are using the user service to allow users to create their own accounts and we also allow users to login with Facebook so we may have users with usernames such as fred123 or actual Facebook names like "Jane Smith" and "Himanshu Sharma". For example, when "Jane Smith" first logs in via Facebook, we link their Facebook username and access token and create a username in App42 called "Jane Smith." Our concern (we have not gone live so we cant really test) is when two or more Facebook users named "Jane Smith" try to log into our app via Facebook. It would seem that the user service would say that the user already exists or bad password or something along those lines since a username with "Jane Smith" already exists. How should we handle allowing multiple "Jane Smiths" to login? It almost feels like we should be using the Facebook email address as the App42 username so I know that it is unique but that just doesn't seem right either. Thanks ahead of time! Scott
asked Jun 1 in Android by gsglawson (10 points)

1 Answer

0 votes

Hi Gsglawson,

 

Instead of passing the username as John Smith in username parameter of createUser function, you can use email id of the user or send any unique id. It will solve your issue. Regarding the actual username that you can save inside user profile or use Storage service to save user information. 

Let me know if you required any help from our side.  

P.S Please have a look at this custom code which will help you to obtain the same and managed using Storage service. 

Regards,

Himanshu Sharma 

answered Jun 1 by hs00105 (1,935 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
Migrate from Parse to ShepHertz App42
...