Skip to content

corinzio/cordova-plugin-google-signin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Sign-In Cordova/PhoneGap Plugin

0. Index

  1. Description
  2. Screenshots
  3. Installation (CLI / Plugman)
  4. Usage
  5. API Documentation
  6. Changelog
  7. Demo
  8. License

1. Description

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.

2. Screenshots

Android

3. Installation (Cordova CLI)

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

3.1 Android Configuration

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:

fingerprint

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.

4. Usage

TODO

5. API Documentation

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

6. Changelog

  • 0.0.1: Initial version

7. Demo

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

8. License

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007.

see License

About

Google Sign In plugin for cordova

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published