如何在Android中禁用reCaptcha? [英] How to disable reCaptcha in android?

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

问题描述

我想禁用reCaptcha,但是我不能这样做,我从

I want to disable reCaptcha but I can't do that, I follow some steps from this link, but it doesn't work for me.

首先,我将SHA-1和SHA-256添加到了Firebase项目中,并且还在Google Cloud Console中,为我的项目启用了Android DeviceCheck API.将使用默认的Firebase API密钥,并且需要允许其访问DeviceCheck API.

First I added SHA-1 and SHA-256 to the firebase project and also in the Google Cloud Console, I enabled the Android DeviceCheck API for my project. The default Firebase API Key will be used and needs to be allowed to access the DeviceCheck API.

但是reCaptcha仍然启用,请帮助我.

But reCaptcha still enable, please help me.

推荐答案

集成测试部分:

除手动测试外,Firebase身份验证还提供API,以帮助编写用于电话验证测试的集成测试.这些API通过禁用Web中的reCAPTCHA要求和iOS中的静默推送通知来禁用应用程序验证.这使得在这些流程中进行自动化测试成为可能,并且更易于实现.此外,它们还有助于提供在Android上测试即时验证流程的功能.

In addition to manual testing, Firebase Authentication provides APIs to help write integration tests for phone auth testing. These APIs disable app verification by disabling the reCAPTCHA requirement in web and silent push notifications in iOS. This makes automation testing possible in these flows and easier to implement. In addition, they help provide the ability to test instant verification flows on Android.

在Android上,在signInWithPhoneNumber调用之前调用setAppVerificationDisabledForTesting().这会自动禁用应用程序验证,使您无需手动解决即可传递电话号码.请注意,即使禁用了reCAPTCHA和/或SafetyNet,使用真实电话号码仍将无法完成登录.此API只能使用虚构的电话号码.

On Android, call setAppVerificationDisabledForTesting() before the signInWithPhoneNumber call. This disables app verification automatically, allowing you to pass the phone number without manually solving it. Note that even though reCAPTCHA and/or SafetyNet are disabled, using a real phone number will still fail to complete sign in. Only fictional phone numbers can be used with this API.

// Turn off phone auth app verification.
FirebaseAuth.getInstance().getFirebaseAuthSettings()
   .setAppVerificationDisabledForTesting();

希望它能起作用.

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

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