EddyVerbruggen / cordova-plugin-googleplus

:heavy_plus_sign: Cordova plugin to login with Google Sign-In on iOS and Android
567 stars 630 forks source link

Cordova googleplus plugin in Ionic... #207

Open shash5 opened 8 years ago

shash5 commented 8 years ago

I'am getting all the details including oauthToken, userId etc.,except serverAuthCode, Access Token and idToken..Any idea..or atleast someone tell is there any difference between oauthToken and serverAuthCode...

sammugg commented 8 years ago

Hey @shash5,

The documentation on GitHub right now revolves around the latest version of the plugin, 4.0.9, which is in pre-release. This version, merged early last week, updated and cleaned up the plugin's usage.

To clarify the oauthToken and serverAuthCode deal, an "oauthToken" is no longer a return value from this plugin. A serverAuthCode is a code that can be exchanged for an access token and refresh token that will let the app access the user's google account on their behalf.

I recommend that you make sure you are using the latest code and read the documentation that we have provided. I also strongly recommend that you read Google's documentation to get a better understanding of the different components you can get back using Google Sign-In.

Happy Coding ~Sam

leonardobazico commented 8 years ago

@shash5, I got same problem. So I removed the plugin and added again from commit: a68441d4ce630aa96f99723274881cfaa52ca9e7

cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-googleplus.git#a68441d4ce630aa96f99723274881cfaa52ca9e7 --save --REVERSED_CLIENT_ID=myReversedClientId

sammugg commented 8 years ago

Little update, I just rebased a bunch of commits into one and pushed. The commit @leonardobazico mentioned was the most recent commit before I rebased, so nothing will have changed.

januszdorosz commented 8 years ago

There is some mistake in documentation. You need to use 'webApiKey' param instead of 'webClientId'. Look at GooglePlus.java in your Cordova plugin directory - how your JS params are put to Google Api.

sammugg commented 8 years ago

@januszdorosz, The documentation reflects the most recent version of the plugin that is on GitHub. The npm version is pointing to a previous version.

Please refer to the README for more info.