verifyPhoneNumber method

  1. @override
Future<void> verifyPhoneNumber({
  1. required String phoneNumber,
  2. TextEditingController? otpController,
  3. bool signInOnAutoRetrival = true,
  4. void codeSent(
    1. String,
    2. int?
    )?,
  5. void verificationFailed(
    1. FirebaseAuthException
    )?,
  6. void verificationCompleted(
    1. PhoneAuthCredential
    )?,
  7. void codeAutoRetrievalTimeout(
    1. String
    )?,
  8. RecaptchaVerifier? verifier,
  9. int? forceResendingToken,
  10. Duration? timeout,
})
override

Starts a sign-in flow for a phone number.

You can optionally provide a RecaptchaVerifier instance to control the reCAPTCHA widget apperance and behaviour.

Once the reCAPTCHA verification has completed, called ConfirmationResult.confirm with the users SMS verification code to complete the authentication flow.

This method is only available on web based platforms.

Implementation

@override
verifyPhoneNumber({
  required String phoneNumber,
  TextEditingController? otpController,
  bool signInOnAutoRetrival = true,
  void Function(String, int?)? codeSent,
  void Function(FirebaseAuthException)? verificationFailed,
  void Function(PhoneAuthCredential)? verificationCompleted,
  void Function(String)? codeAutoRetrievalTimeout,
  RecaptchaVerifier? verifier,
  int? forceResendingToken,
  Duration? timeout,
}) {
  return auth.signInWithPhoneNumber(phoneNumber);
}