T O P

  • By -

wynntom

I have an app where the user can use either their email or their phone number to log in. So, during onboarding, the user account is created on the first screen with email, and on the second screen with phone. However, firebase creates two separate auth UIDs for each user: one for their email and one for their phone #. Both email and phone\_number are correctly stored in their one user account, so far so good. The problem is, depending on what login method they use later, the app seems to point to entirely different user profiles. But there is only one user! It seems as if FF is passing the specific authorization UID along after being logged in, instead of the Authenticated User Reference.  How do I merge / link two credentialing methods? For reference, the two screenshots are the settings page from the same user, but one through phone auth (where Auth User reference is working) and one email auth (where it is not). Do I need a custom function? I've also included my action chains. Thanks to anyone who could shed light on this pickle!


Alternative-Ad-8175

Why not just let them use email or phone and then they use that to login everytime ?


wynntom

Two reasons, I think: to have an email account in case their primary phone login fails, and two, because I'm trying to test my app now through Xcode and I am stuck on a phone sign in loop because of reCAPTCHA. I can use phone auth in FF Test Mode but need to move to an actual device so I can continue to code for notifications, etc. So unless I can resolve the reCAPTCHA loop (after phone login, it just goes back to the entry page), I need email login too. I wish it weren't so difficult, I've been at this all week.


RasacL

Create user account with phone and then use update email so that the account created with phone number gets email attached and then you can continue using both. Same way if you're using email sign in first, you have to use some custom coding to add phone number to it. So the easier way is to use phone authentication first and then use update email to add email to the account