Social Login (for ionic 3 app)
Last updated
Last updated
Uncomment Facebook and GooglePlus import in src/app/app.module.ts and src/pages/account/login/login.ts
Uncomment Facebook and GooglePlus in the providers section of src/app/app.module.ts
Add GooglePlus, Facebook constructor src/pages/account/login/login.ts file
Uncomment Social login in src/pages/account/login/login.ts file
Uncomment Social login buttons in src/pages/account/login/login.html file
Get your credentials from Google.
Install the Google native plugin.
1. Get your credentials from Google.
let’s start with the iOS one,
Choose your project. Click settings icon and then select project settings
Click on ADD APP and then choose a 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.
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
Add CLIENT_ID in src/providers/config.ts file
2. Install the GooglePlus Cordova Plugin.
Run the following command to install GooglePlus Cordova plugin
Make sure you've registered your Facebook app with Facebook and have an APP_ID
Retrieve the App ID
and App Name
2. Add android and ios platforms. Go to settings>basics as shown below and click +Add Platform.
3. Fill the required fields while adding android and ios platforms and save changes.
4. In the final step, Change the status of the app from development mode to Live.
Install the Cordova and Ionic Native plugins. where App ID
and App Name
are the values of the Facebook Developer portal.
You are done. Build Your App
Go to and create a project.
Once project is added we need to create both ios and android app in firebase console .
More detail -
First, have to create a new Facebook App inside of the Facebook developer portal at .