HelloJS + Cordova: Trouble with redirect_uri

我怕爱的太早我们不能终老 提交于 2019-12-24 14:22:55

问题


I'm having some trouble using HelloJS with the Google+ API. It has been running nicely using a local development server, but when I try using it wrapped in a Cordova application, I'm getting an error.

Within the Google Development Console I've created a client id for web applications. The settings have been set as below;


On my phone I get a 400 Error "Invalid parameter for redirect_uri: Missing authority: file:///android_asset/www/index.html"

Any suggestions on how to solve this?


回答1:


Explicitly set

 hello.init( clientIds, {redirect_uri:'http://localhost/'})


来源:https://stackoverflow.com/questions/27677421/hellojs-cordova-trouble-with-redirect-uri

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!