4
votes

I have to create a sign up phone number option in app and I am getting a little confused when it comes to phone number/verification textfield and whole interface controller. Do I have to create this on my own or firebase auth is supporting this screen as it happens in digits?

firebase docs: https://firebase.google.com/docs/auth/ios/phone-auth

2

2 Answers

4
votes

You have two solutions, one would be to use their UI: https://github.com/firebase/FirebaseUI-iOS

The second one would be to create the UI on your own and just call methods mentioned in the link you shared:

  • verifyPhoneNumber (which returns the code)
  • credentialWithVerificationID (creates verification object)
  • signInWithCredential (accepts the verification object and tries to sign-in)
0
votes

Basically, you want to get the user phone number in order to receive the code(most likely from a textfield). Once you successfully sent the code. transition to a view where the user can enter the code received thru sms than login the user. keep in mind the phone number format has to be something like this +countrycodeStatecodeNumber or +13051239988