Skip to main content

Obtaining configuration information

Please note that you do not need Firebase to configure Google Sign In. However, if you use it, it's a little easier to set up the sign in experience because Firebase gives you one file to download and put into your project.

Configuration information obtained in this guide is used in later steps of the setup and in the configure() call.

Android

Follow the 2 steps below to set up Google Sign In for your Android app.

danger

Completing this guide is crucial for Google Sign-In to work on Android. If not done correctly, you will get the infamous DEVELOPER_ERROR error (how to troubleshoot it).

Step 1: Obtain SHA-1 certificate fingerprints

You probably use multiple signing configurations for your Android app - for example for building debug and release APKs locally or building on Expo EAS. Then there's the Play App Signing for store deployments - while the Google Play Store does not rebuild your app, it may re-sign it using its own signing configuration.

First, you need to obtain the SHA1 certificate fingerprints for all of these signing configurations using the instructions below. Then, use all of those SHA1 hashes in "Step 2".

If you're using Expo EAS, run eas credentials to obtain the Keystore information, which includes the SHA-1 fingerprint. See EAS credentials docs to learn more.

Step 2: Add SHA-1 hashes to Firebase or Google Cloud Console

Using all of the SHA-1 fingerprints obtained in the previous step, follow the instructions below.

  1. Sign in to Firebase and open your project.
  2. Click the Settings icon and select Project settings.
  3. In the "Your apps" card, select the app you need to add SHA1 to.
  4. Click "Add fingerprint".
  5. Check that "Package name" is correct.
  6. Download the google-services.json file.

Firebase, add Android keystore's SHA1 to your project


iOS

Read below on how to set up Google Sign In for your iOS app.

  1. Sign in to Firebase Console and open your project.
  2. Click the settings icon and go to "Project settings".
  3. Scroll down to "Your apps" section, and select the app.
  4. Check that "Bundle ID" is correct.
  5. Download the GoogleService-Info.plist file.

Web Client ID (optional)

For some use cases (offline support, web support), a Web Client ID is needed (provided to the configure() call). To obtain a Web Client ID, go to Google Cloud Console and find an existing one (it may be already created by Firebase) or create a new OAuth Client ID of type Web.