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?
3 easy steps:
firebase_auth_platform_interface
dependency to your pubspec.yaml
file with flutter pub add firebase_auth_platform_interface
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart' show FirebaseAuthPlatform;
RecaptchaVerifier
, you use FirebaseAuthPlatform.instance