Darshan Prajapati
Darshan Prajapati

Reputation: 1014

How to remove captcha verification from Firebase phone auth using flutter web?

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) {});

Upvotes: 13

Views: 12978

Answers (1)

Bubloo
Bubloo

Reputation: 161

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.

Upvotes: 16

Related Questions