I have a website using ASP.NET Core, which uses MS Identity and external login from Facebook.
I have a Xamarin app that logs to this backend via login/password using Xamarin.Auth. I am wondering which is the best way to allow external login to Facebook from the app?
- Should I create a separate Facebook app for Android or should I use the same as the website?
- What would be the flow?
I am thinking of something like:
- Using the Facebook sdk to log in
- Pass the token to the server
- Check from server side if the email exists or the FB user id exists
- If yes check whether the app is registered using Facebook and if yes login
- If no create an account
But until now I haven't stored the user's Facebook Id (only the email, that the user can also modify).