confirmPhoneCode method

Future<void> confirmPhoneCode(
  1. String code
)

Confirme phone with code

Implementation

Future<void> confirmPhoneCode(String code) async {
  // Create a PhoneAuthCredential with the code
  final credential = PhoneAuthProvider.credential(
    verificationId: verificationId,
    smsCode: code,
  );

  // Sign the user in (or link) with the credential
  await _firebaseAuth.signInWithCredential(credential);
}