如何在Firebase Phone-Auth(OTP)Android中禁用reCaptcha? [英] How to disable reCaptcha in firebase phone-auth (OTP) android?

查看:71
本文介绍了如何在Firebase Phone-Auth(OTP)Android中禁用reCaptcha?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近更新了firebase库,但没有进行其他更改.

 实施'com.google.firebase:firebase-auth:20.0.1'实施'com.google.firebase:firebase-messaging:21.0.0'实施'com.google.firebase:firebase-storage:19.2.0'实施'com.google.android.gms:play-services-auth:19.0.0' 

,但是每当用户尝试注册时,都会显示Recaptcha几秒钟,然后有时会从firebase auth收到OTP之后重定向到Web浏览器(CustomChromeTab).大约需要15到30秒.如何预防Recaptcha?但是,我在firebase控制台中添加了SHA1和SHA256,并且没有更改代码.谢谢.

这是验证码验证过程的屏幕截图:

解决方案

在实现依赖项的大多数情况下,例如:

 实现'androidx.browser:browser:1.2.0' 

上面的窗口在浏览器中弹出.

在这里,是成功解决它的一种方法.

第1步

在Google云控制台中,启用

第2步

如果您尚未指定应用的SHA-256指纹,请从Firebase控制台的设置"页面进行.有关如何获取应用程序的SHA-256指纹的详细信息,请参阅身份验证客户端.

希望它能正常工作!!!有关更多信息,您还可以检查 Google SafetyNet API 用于在电话验证时检查设备中Google Play服务的安装.

I've updated the firebase library recently and didn't change anything else.

  implementation 'com.google.firebase:firebase-auth:20.0.1'
  implementation 'com.google.firebase:firebase-messaging:21.0.0'
  implementation 'com.google.firebase:firebase-storage:19.2.0' 
  implementation 'com.google.android.gms:play-services-auth:19.0.0'

but whenever a user tries to signup, a Recaptcha is showing for a few seconds and then sometimes redirects to a web browser (CustomChromeTab) after that OTP is received from firebase auth. It takes about 15-30 seconds. How to prevent the Recaptcha? However, I added the SHA1 and SHA256 in the firebase console and have not changed the code. Thanks.

Here is the screenshot of the captcha verification process:

解决方案

Most of the times while implementing dependencies like:

implementation 'androidx.browser:browser:1.2.0' 

the above window pops-up in the browser.

Here, is a way to resolve it successfully.

Step 1-

In the Google Cloud Console, enable the Android DeviceCheck API for your project. The default Firebase API Key will be used, and needs to be allowed to access the DeviceCheck API.

Step 2-

If you haven't yet specified your app's SHA-256 fingerprint, do so from the Settings Page of the Firebase console. Refer to Authenticating Your Client for details on how to get your app's SHA-256 fingerprint.

Hope it works!!! For more information, you can also check Google SafetyNet API for checking Google Play Services installation in device at the time of Phone Authentication.

这篇关于如何在Firebase Phone-Auth(OTP)Android中禁用reCaptcha?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆