Giter Site home page Giter Site logo

couragecowardlydog / ionic-google-auth Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 9.3 MB

Ionic 3 native Google plus plugin Implementation

TypeScript 41.21% HTML 23.95% CSS 30.40% JavaScript 4.44%
ionic ionic2 ionic-framework ionic-cordova ionic-native ionic2-examples ionic-apps ionic-plugin google-api googleplus

ionic-google-auth's Introduction

Google+ Auth - Ionic Implementation

As I wanted to integrate Google+ Auth in one my project, I started searching out documentation and tutorials for Google+ Auth Ionic Implementation. Unfortunately there is no proper documentation or tutorial to guide integration properly. Since I dont want any one to waste time on google, I made a small standalone implementation

If you want to integrate on existing Ionic App , use this command to retrive the SHA-1 KEY

keytool -exportcert -keystore D:\Personal\ionic-google-auth\gauth.keystore -list -v

Here D:\Personal\ionic-google-auth\gauth.keystore is path to my keystore

If you want to integrate on a new project, make sure you always test with signed APK , use the following command to generate SIGNED CERTIFICATE

keytool -genkey -v -keystore gauth.keystore -alias gauth -keyalg RSA -keysize 2048 -validity 100000

With SHA-1 KEY Obtained from the previous step , navigate to https://console.developers.google.com/apis/dashboard and enable Google+ API

Next move is to create credentials , https://console.developers.google.com/apis/credentials

Click on Create Credentials to create a OAuth Client ID . Use the retrived SHA-1 signing-certificate fingerprint and your package name in config.xml to complete the step

Once you completed this you'll get client ID, now you can process to ionic implementation.

ionic cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=myreversedclientid

If you are building a hybrid application (iOS and Android), or an Android application, you have to replace myreversedclientid with the reverse value of Client ID in your Release credential generated , on Google Developer's Console, this will be: "com.googleusercontent.apps.uniqueId", without quotes. Example: '123-abc123.apps.googleusercontent.com' becomes 'com.googleusercontent.apps.123-abc123'.

Now all its done, play with your code . Make sure you always build and test with signed apk. So that you dont need to update SHA-1 Certificate of your APK everytime in the console

GAuth GAuth
GAuth GAuth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.