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

查看:29
本文介绍了如何在 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 后重定向到网络浏览器 (CustomChromeTab).大约需要 15-30 秒.如何防止 Recaptcha?但是,我在 firebase 控制台中添加了 SHA1 和 SHA256 并且没有更改代码.谢谢.

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

解决方案

大多数时候在实现依赖项时,例如:

实现'androidx.browser:browser:1.2.0'

在浏览器中弹出上述窗口.

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

步骤 1-

在 Google Cloud Console 中,启用

步骤 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天全站免登陆