如何将Google的reCAPTCHA集成到React Native应用程序中? [英] How to integrate Google's reCAPTCHA in a React Native app?

查看:128
本文介绍了如何将Google的reCAPTCHA集成到React Native应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还没有找到任何可帮助reCAPTCHA的React Native库,我发现的唯一Android库是

I haven't found any React Native library to help with reCAPTCHA, and the only Android library I found is Android-Lib-reCAPTCHA but it uses the old API (showing a cypher instead of a checkbox).

我尝试使用 react-native-webview-bridge 显示Javascript reCAPTCHA ,但我无法使其正常工作,并且它非常缓慢且不稳定.此外,有时验证码不仅需要复选框,还需要更多空间来显示图片.

I have tried to show the Javascript reCAPTCHA using react-native-webview-bridge but I couldn't make it work and it's very slow and unstable. Besides sometimes the captcha needs more space to display pictures when it's not just a checkbox.

除了WebView之外,您还知道其他方法吗?我还检查了原生的Android验证码系统,但它们都太旧/太复杂了(密码).

Do you know any other way than a WebView? I also checked out native Android captcha systems but they are all too old/complicated (cyphers).

此外,机器人安装应用程序和订阅的频率是多少?也许我不需要验证码,而只需要一个秘密密钥/CSRF令牌?

Also, what is the frequency of robots installing apps and subscribing through? Maybe I don't need a captcha but just a secret key/CSRF token?

推荐答案

对于Web或移动Web应用程序,有很多针对Google验证码的反应包装.例如, github/react-grecaptcha 为我服务就像是一种魅力.

For the case of web or mobile web application there are a bunch of react wrappers for google captcha. For example github/react-grecaptcha worked for me like a charm.

这篇关于如何将Google的reCAPTCHA集成到React Native应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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