Link phone number to a Firebase user Flutter

571 views Asked by At

I have a registration screen where the user enters Email, Password and Phone Number.

Then, I create a user with the email and password:

Future<String> signUp({String email, String password}) async {
    try {
      await _firebaseAuth.createUserWithEmailAndPassword(
          email: email, password: password);
      return 'Registered successfully';
    } on FirebaseAuthException catch (e) {
      return e.message;
    }
  }

After this I have a VerifyOTP screen where I have to verify the phone number entered using OTP. Once the phone number is verified, I want to link it with the account created.

How should I link it with the account created? Please help me

I just want the users phone number to be verified but, I don't want login via PhoneNumber

0

There are 0 answers