(Ionic login with google plus) explains about implementing google plus login using cordova-plugin-google-plus plugin with ionic native.


Login with Google Plus Video Lesson

Create Client Reversed Client Id:

Create New project & Change working directory

ionic start gplogin blank
cd gplogin

Add your platform

ionic cordova platform add android
npm install --save @ionic-native/googleplus

Change you working directory & Add plugin

ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.877300201036-6lp9u547lbqcsk7hk3qn4tt35iopqh5u
ionic cordova plugin add --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.877300201036-6lp9u547lbqcsk7hk3qn4tt35iopqh5u

working with home.html

<ion-content padding>
<div *ngIf="isUserLoggedIn"style="text-align:center">
 <button ion-button clear (click)="logout()">Logout</button>
<ion-footer *ngIf="!isUserLoggedIn">
 <button ion-button block (click)="loginWithGP()">Login with Google+</button>

Explanation: In above code we have created div content for displaying users information and footer for login, if user is not loggedin

working with home.ts

   }).catch( err => console.log(err));
logout(){ ()=>{

Explanation: In above code we have created an object for a googlePlus module. Using that, we’re calling both login and logout operations.

Please login to download source code Login Here
Sundaravel M

About the author: Hi! I'm Sundaravel (codesundar), Founder of I have been a Web, Mobile App developer, Author, and Teacher since 2014. I also worked as a software consultant for fortune 500 companies. I created to share my real-time knowledge in various technologies such as PhoneGap, Ionic, Flutter and more.