13

I wants to remove or a make invisible google recaptcha verfication. My code for verifying mobile number and sign in

await FirebaseAuth.instance.verifyPhoneNumber(
    phoneNumber: "+91${customMobileController.text.toString()}",
    timeout: const Duration(seconds: 5),
    verificationCompleted: verificationCompleted,
    verificationFailed: verificationFailed,
    codeSent: codeSent,
    codeAutoRetrievalTimeout: codeAutoRetrievalTimeout);

For sign in

var authCredential = PhoneAuthProvider.getCredential(
    verificationId: verificationId,
    smsCode: otp,
);

await FirebaseAuth.instance
    .signInWithCredential(authCredential)
    .then((value) {})
    .catchError((error) {});
Darshan Prajapati
  • 914
  • 3
  • 8
  • 19
  • 3
    @YauhenSampir actually brother i go through that question and it's in javascript and i wants it in flutter web – Darshan Prajapati Jul 21 '20 at 17:36
  • What is the difference? Do you think that Flutter Firebase API different than Javascript? – Yauhen Sampir Jul 21 '20 at 17:37
  • It is impossible to achieve what you want on any Firebase SDK, Flutter it or not. Firebase uses reCAPTCHA to prevent abuse, such as by ensuring that the phone number verification request comes from one of your app's allowed domains. https://firebase.google.com/docs/auth/web/phone-auth – Yauhen Sampir Jul 21 '20 at 17:40
  • @YauhenSampir Library for both is different. In flutter there is no utility for handle google recaptcha like javascript. So i wants to know how to achieve it using dart – Darshan Prajapati Jul 21 '20 at 17:44
  • 3
    @YauhenSampir Ok it is impossilbe but how can we invisible it like google recaptcha v3 in dart code – Darshan Prajapati Jul 21 '20 at 17:47

1 Answers1

16

You can remove reCaptcha by Enabling the Android Device Verification API in Your Project on google cloud console. You can do that by Adding Your Project there.

After that you should also add SHA-256 key in Your Firebase Project in Project Setting.

Now there will be no reCaptchaa to verify to that your are not a robot.

Bubloo
  • 161
  • 1
  • 5