0

I thought after firebase version 3.0.0 phone Auth would be integrated. However, I keep getting the error that firebase.auth().verifyPhoneNumber() is not a function (Node.js). I am currently working with react native, which means I am using the web API. Does anyone know how to proceed from here?

  • "firebase": "^4.8.0",

EDIT: I am implementing facebook, google and email as sign-in methods. My app however, requires that the users verifies his/ her phone number. All I see in the docs is how to signIn via SMS but no verification.

Thanks in advance!

Walter Monecke
  • 2,386
  • 1
  • 19
  • 52
  • maybe this a bit irrelevant, but the way we're handling phone auth is sending a code to the user's phone via Twilio and having them enter that code in a field to verify them. – Shayan Javadi Dec 11 '17 at 03:00
  • @ShayanJavadi no its good! I was thinking of Twilio myself now.. But I would have really liked this to be a part of firebase. A one-stop-shop. – Walter Monecke Dec 11 '17 at 12:37

1 Answers1

1

When you signInWithPhoneNumber, you are essentially verifying a user's phone number. You could sign in with Facebook/Google and then linkWithPhoneNumber/updateWithPhoneNumber to the currentUser. This would update the user's phone number and verify ownership too. Phone number authentication has been supported in Firebase since version 4.x.x. BTW, this doesn't work out of the box for react-native. You would need to use a similar approach to this: Ionic2 authentication firebase

bojeil
  • 29,642
  • 4
  • 69
  • 76