gpt4 book ai didi

firebase - 如何在 firebase phone-auth (OTP) android 中禁用 reCaptcha?

转载 作者:行者123 更新时间:2023-12-03 15:34:32 26 4
gpt4 key购买 nike

我最近更新了 firebase 库,没有改变任何其他东西。

  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'
但是每当用户尝试注册时,Recaptcha 都会显示几秒钟,然后有时会在从 firebase auth 收到 OTP 后重定向到网络浏览器 (CustomChromeTab)。大约需要 15-30 秒。如何防止 Recaptcha?但是,我在 firebase 控制台中添加了 SHA1 和 SHA256,并且没有更改代码。谢谢。
这是验证码验证过程的屏幕截图:
enter image description here

最佳答案

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

implementation 'androidx.browser:browser:1.2.0' 
在浏览器中弹出上述窗口。
在这里,是一种成功解决它的方法。
第1步-
在 Google Cloud Console 中,启用 Android DeviceCheck API为您的项目。将使用默认的 Firebase API key ,并且需要被允许访问 DeviceCheck API。
enter image description here
第2步-
如果您尚未指定应用的 SHA-256 指纹,请从 Firebase 控制台的“设置”页面执行此操作。有关如何获取应用程序的 SHA-256 指纹的详细信息,请参阅验证您的客户端。
enter image description here
希望它有效!!!
更多信息,您也可以查看 Google SafetyNet API用于在电话验证时检查设备中的 Google Play 服务安装。

关于firebase - 如何在 firebase phone-auth (OTP) android 中禁用 reCaptcha?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64999106/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com