0

How to register a user who is registering to my app with the help of Facebook or Google with his mobile number(who doesn't has email id associated with account)? I'm not getting any unique field that I'll be storing in my db if user register's with Facebook/Google with his phone number as I'm getting email as null. I got nameidentifier in claims which was a long integer which I'm assuming is unique but not sure about it. Please help me out to handle this scenario

light
  • 41
  • 1
  • 5
  • 1
    What's about the UID of each user? I don't know about the asp.net implementation but the Java & Flutter APIs of Google/Facebook login return a user object that has an UID assigned. As it's name suggests, it's a unique ID – SteapStepper69 Mar 04 '20 at 14:40
  • How do other sites like Stackoverflow handle scenario when user logs in with phone number? is this field unique Microsoft.AspNet.Identity.UserLoginInfo for all users? someone pls confirm so i can add this in db and check when user tries to login again – light Mar 04 '20 at 14:54
  • 1
    as max mentioned already, the user id is the only reliable identification for returning users. facebook and google both return a unique id. – andyrandy Mar 04 '20 at 15:41
  • And as addition, you could always generate your own UID an store it together with an email or phone number to uniquely identify a user. Take a look at this: https://stackoverflow.com/questions/8477664/how-can-i-generate-uuid-in-c-sharp – SteapStepper69 Mar 05 '20 at 06:14

0 Answers0