首页 > 解决方案 > 使用本机反应跳过firebase电话授权中的机器人验证

问题描述

在 Firebase 中进行电话验证时,应用程序会打开一个 App-Name/auth/handler 页面并进行机器人验证并再次返回应用程序,然后收到 OTP。

我想跳过机器人验证的这个中间步骤。

我尝试使用

 firebase().auth().settings.appVerificationDisabledForTesting = true;

但它似乎仅用于测试目的和 IOS。

标签: androidfirebasereact-nativefirebase-authentication

解决方案


通过注册您的应用程序以在 Google 的 SafetyNet 上正常工作,这适用于 android。

在此处查看有关 android 的文档:https ://firebase.google.com/docs/auth/android/phone-auth#enable-app-verification

如果您遇到困难,如何启用 SafetyNet 也有类似的问题:https ://stackoverflow.com/a/64657110/3668241

也许也有兴趣:

对于 iOS 以避免验证页面,您需要启用静默推送通知:https ://firebase.google.com/docs/auth/ios/phone-auth#start-receiving-silent-notifications


推荐阅读