Create a Google client
To use Google as an IdP, visit Google’s API Dashboard, and follow these steps:
-
In the left navigation, click Credentials.
-
Click CREATE CREDENTIALS > OAuth client ID.
-
For an Android app:
-
Select
Android
as the value for Application Type. -
In the Name field, type a name for this application.
-
Enter the package name from the
AndroidManifest.xml
file. -
Enter the SHA-1 certificate fingerprint.
Use the following command to get the fingerprint:
keytool -keystore path-to-debug-or-production-keystore -list -v
-
Click Create.
-
-
For an iOS app:
-
Select
iOS
as the value for Application Type. -
In the Name field, type a name for this application.
-
Enter the bundle id as listed in the app’s
Info.plist
file. -
If the app is listed in the Apple App Store, enter the Apple ID of the app.
-
Enter the Team ID that Apple assigned to your team.
-
Click Create.
-
-
For a JavaScript app:
-
Select
Web application
as the value for Application Type. -
In the Name field, type a name for this application.
-
Under Authorized JavaScript Origins, add the origins of the apps that use Google as an IdP.
Origins include scheme, domain, and port.
-
Under Authorized redirect URIs, add the full redirect URLs of your apps that handle the redirection from Google after user login.
-
Click Create.
-
Native Android social authentication
To enable native Android social authentication, you must create two OAuth clients in the Google API console:
-
Create an OAuth client ID for the Android application.
See the step for an Android app above.
-
Create an OAuth client ID for AM to communicate with the Google APIs.
See the step for a JavaScript app above.