Read this document to avoid any mistake or conflict -
Uncommenting the code
I have commented social login code because some people find it difficult to integrate. To add social login you have to install native plugins and uncomment the code
Uncomment Facebook and GooglePlus import in src/app/app.module.ts and src/app/account/login/login.ts
//import { Facebook } from '@ionic-native/facebook/ngx';
//import { GooglePlus } from '@ionic-native/google-plus/ngx';
Uncomment Facebook and GooglePlus in providers section of src/app/app.module.ts
// Facebook,
// GooglePlus,
Uncomment GooglePlus, Facebook in constructor in src/app/account/login/login.ts file
Choose your project. Click settings icon and then select project settings
Click on ADD APP and then choose platform
It will ask you an iOS Bundle ID, to get it, go into your app’s config.xml file and copy the package id you’re using, it’s the one that looks like (id=”com.ionicframework.something”) from your config.xml file.
Click REGISTER APP. It will generate GoogleService-Info.plist file.
Click on Download GoogleService-Info.plist file, which is a config file for iOS.
After downloading GoogleService-Info.plist file click on Continue > Continue > FINISH.
Copy GoogleService-Info.plist file to your project root directory.
You will getREVERSED_CLIENT_ID from the downloaded GoogleService-Info.plist file. REVERSED_CLIENT_ID is required while installing Google native plugin at the later stage.
Once we add iOS app, we need to add Android app.
Click ADD APP and choose android platform
It will ask you an Android Bundle ID, to get it, go into your app’s config.xml file and copy the package id you’re using, it’s the one that looks like (id=”com.ionicframework.something”) from your config.xml file.
Click REGISTER APP. It will generate google-services.json file
Click on Download google-services .json file, which is a config file for Android.
After downloading google-services.json file click on Continue > FINISH
Copy google-services.json file to your project root directory. that is app folder
Add CLIENT_ID in src/providers/config.ts file
2. Install the GooglePlus Cordova Plugin.
We will get REVERSED_CLIENT_ID in GoogleService-Info.plist file
Run following command to install GooglePlus Cordova plugin. CLIENT ID with REVERSE CLIEND ID