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:
- First log in in my app with FB Login
- After log in with fb, my application makes request to web api, checks if there is an user with same email address.
- 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:
- Clicks on login button in my application
- After log in with fb, my application makes request to web api, checks if there is an user with same email address.
- 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?