This plugin allows you to log on with your Google account on Android.
The plugin can be configured to get an authentication token to use it with a specific backend server and/or enable server side API-access.
At the moment the plugin is not released as a npm package but you can install latest version directly from git repository with the command:
cordova plugin add https://github.com/corinzio/cordova-plugin-google-signin
To configure Android, you will need to perform Step 2 (Get a configuration file) of this guide. If you plan to use only authentication in your cordova app this step will create necessary credentials in Developer Console and you don't have to use the generated file in your project. Anyway make sure to get the debug and/or release certificate fingerprint as explained here or authentication will fail. During the configuration file step it will be requested to enter that fingerprint in this page:
Usually I insert in this page the debug certificate fingerprint, when you will need the release certificate you will be able to add it in the google developer console.
TODO
You can find the plugin API documentation here
It is possible to use jsdoc to generate the documentation with the command:
jsdoc -c jsdoc.conf -t node_modules/minami www/GSignIn.js
- 0.0.1: Initial version
In the directory "demo" of the repository you will find some file for a "HelloCordova" app using the signin plugin. Here the step to test it:
cordova create <app_name>
cordova platform add android
- execute the configure android step (3.1 of this page)
- copy www/index.html and www/js/index.js
- configure line 43 of index.js to the client id of your backend server or make an empty configuration
- add plugin with command
cordova plugin add https://github.com/corinzio/cordova-plugin-google-signin
- run the app
cordova run android
- After login the information are printed in the console, to inspect those returned values you can connect using
chrome://inspect/
installing the app on a real device
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007.
see License