如何使用Flutter Web从Firebase电话身份验证中删除验证码验证? [英] How to remove captcha verification from Firebase phone auth using flutter web?
本文介绍了如何使用Flutter Web从Firebase电话身份验证中删除验证码验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想删除或进行不可见的Google Recaptcha验证.我用于验证手机号码和登录的代码
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);
用于登录
var authCredential = PhoneAuthProvider.getCredential(
verificationId: verificationId,
smsCode: otp,
);
await FirebaseAuth.instance
.signInWithCredential(authCredential)
.then((value) {})
.catchError((error) {});
推荐答案
您可以通过在Google云控制台上的项目"中启用Android设备验证API来删除reCaptcha.您可以通过在此处添加项目来做到这一点.
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.
此后,您还应该在项目设置的Firebase项目中添加SHA-256密钥.
After that you should also add SHA-256 key in Your Firebase Project in Project Setting.
现在将不再需要reCaptchaa来验证您不是机器人.
Now there will be no reCaptchaa to verify to that your are not a robot.
这篇关于如何使用Flutter Web从Firebase电话身份验证中删除验证码验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文