0

I'm implementing facebook login in my mobile application. I was wondering how connect FB user with my database user, let's see this scenario:

  1. First log in in my app with FB Login
  2. After log in with fb, my application makes request to web api, checks if there is an user with same email address.
  3. If not: my application makes request to web api and creates new user account with username: user[facebookid] and email from FB account (and password is random hash)

User logout or deletes app, and want to log in once again with fb:

  1. Clicks on login button in my application
  2. After log in with fb, my application makes request to web api, checks if there is an user with same email address.
  3. There is an user with same address, so user is logged on his old account

BUT: what happened if someone will create account with username like i was using for fb accounts: user[someonesfacebookid] and email from someones fb account? I know that email confirmation could handle with that, but i want keep registration super simple and easy. There is other solution?

user1483208
  • 385
  • 5
  • 24

0 Answers0