Open shash5 opened 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
@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
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.
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.
@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.
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...