Social Login
Last updated
Last updated
To setup Google Login in the Ionic Angular Capacitor Full App starter, you need to perform following steps
Create a new Google Project via either Firebase or Google Developer console
Create 'Web App' in the Firebase project. Copy the configuration from the web project and paste in environment.ts
in the starter
Replace web-client-id
in the starter with web-client-id
of your Google Project (This is automatically created when you create the Google Project). You can get this from Google Developer console
Replace the GoogleServices-Info.plist
and google-services.json
with the respective files from your Google Project. You will need to add an iOS and Android project to be able to receive these files from Firebase Project, respectively.
Make sure the app ID (com.xxxx.xxxxxxx) you enter when creating Android or iOS app in your Google Project is same as your app ID
Make sure you enter the SHA-1 key from your system in the Android app of the Google Project
For the web-client-id
to work properly for your domain (or localhost:port) make sure you enter the required domain URL/local URL in valid Javascript origins in Google Developer Console (Click on the web-client-id and enter the origins)
You can check out detailed instruction on our blog - Google Login in Ionic Angular Capacitor App