在cordova/phonegap应用程序中使用reCaptcha [英] reCaptcha usage in cordova/phonegap application

查看:126
本文介绍了在cordova/phonegap应用程序中使用reCaptcha的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将google recaptcha与cordova html5应用程序集成.但是cordova在应用程序中使用文件协议.因此,在应用程序中使用验证码会给出错误:网站密钥的域无效" .

I am trying to integrate google recaptcha with cordova html5 application. But cordova uses file protocol in the application. So using captcha in the app gives "Error: invalid domain for site key".

我正在使用cordova 3.5.0构建应用程序,并且在config.xml中添加了<access origin="*" />.

I am using cordova 3.5.0 for building the application and <access origin="*" /> is added in config.xml.

recaptcha只能用于Web应用程序,而不能用于混合/本机应用程序吗?

Is recaptcha can be used only for web applications and not for hybrid/native aapplications?

推荐答案

由于协议问题,reCaptcha不能直接在cordova项目中使用.

reCaptcha cannot be used directly in a cordova project because of protocol issues. Either

-我们必须在单独的网络视图

-使用安全令牌的方式来加载他们最近引入的reCaptcha( https://developers.google.com/recaptcha/docs/secure_token )

-Use secure token way of loading reCaptcha that they introduced recently (https://developers.google.com/recaptcha/docs/secure_token)

这篇关于在cordova/phonegap应用程序中使用reCaptcha的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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