firebase-authenticationflutter-web

Get FirebaseAuthPlatform for Flutter web RecaptchaVerifier


SITUATION: I'm in the process of implementing Firebase phone sign-in on flutter web. In doing so, I want to customize the reCAPTCHA that is called by the signInWithPhoneNumber function as outlined in the Firebase documentation.

final ConfirmationResult confirmationResult = await auth.signInWithPhoneNumber(
  phoneNumber, verifier_should_go_here
);

COMPLICATION: I am trying to implement the RecaptchaVerifier, but it has a required parameter called FirebaseAuthPlatform, and I can't figure out how to generate this parameter for my app.

QUESTION: How can I create a RecaptchaVerifier to pass to the signInWithPhoneNumber function on flutter web?


Solution

  • 3 easy steps: