cordova-google-signin

Component to authenticate with Google services in cordova apps


Keywords
cordova, oauth, google, sign-in, inappbrowser, web-component, web-components
License
Apache-2.0
Install
bower install cordova-google-signin#1.2

Documentation

cordova-google-signin

Polymer component for google-signin in cordova apps

Use this component instead of when you are packing your app using cordova

You will need InAppBrowser plugin

As described in https://developers.google.com/identity/protocols/OAuth2InstalledApp your secret key is not supposed to be secret for installed apps

 <cordova-google-signin 
    id="cordovasignin" 
    client_id="your-client-id"
    client_secret= "your-secret-key">
  </cordova-google-signin>
  <script type="text/javascript">
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {      
        window.open = cordova.InAppBrowser.open;
        document.querySelector("#cordovasignin").getToken();
    }
  </script>