Search code examples
cordovaoauth-2.0hello.js

HelloJS + Cordova: Trouble with redirect_uri


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;

enter image description here

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?


Solution

  • Explicitly set

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