Troubleshooting Supabase Google Sign-In Integration (Expo React Native)

Doaily

Doaily is my gamified to-do list system turned into a real app to help you stay accountable and get things done.

Download Doaily

These are troubleshooting methods you can try if Google Sign-in isn't working for you after following the official Supabase integration tutorial.

//What Worked For Me on Android

SHA-1 Certificate Fingerprint

For the production build, get the SHA-1 certificate from the Google Play Console:

  1. Navigate to the specific app on your Google Play Console
  2. In the menu, find Release and go to App signing under Setup
  3. Copy the SHA-1 certificate fingerprint provided for App signing key certificate

For development builds, to fix the code 10 error of "DEVELOPER_ERROR":

  1. Copy the SHA-1 certificate that gets logged in the terminal after running
eas credentials

Google Cloud

Do the following individually for the two SHA-1 certificate fingerprints from above:

  1. Navigate to APIs & Services for your project in Google Cloud
  2. Navigate to Credentials
    1. Create credentials
      1. Select Android for Application type
      2. Add a name that you want
      3. The correct Package name for your project
      4. Paste the SHA-1 certificate from the Google Play Console app signing key certificate
      5. Press Create
  3. Copy the Client ID that was just generated

Supabase Dashboard

  1. Navigate to Authentication -> Providers under Configuration -> Google
  2. In the Authorized Client IDs text input, add the Client ID that you just made in Google Cloud to whatever input you already have separated by commas.
    Example: [FIRST_CLIENT_ID], [NEW_CLIENT_ID]
  3. Press Save

If it doesn't work right away, give it 5 minutes to a few hours for the new Google Cloud credentials and the new Supabase configuration to take in effect.

//What Worked For Me on iOS

Skip nonce check in the Supabase dashboard has to be enabled for Google sign-in to work on iOS.

Otherwise, you get

[AuthApiError: Passed nonce and nonce in id_token should either both exist or not.

//If all else fails

Add the actual SHA-1 certificate fingerprint in the app.json file within the android configuration

"android": {
  "config": {
    "googleSignIn": {
      "certificateHash": "ONE_OF_THE_SHA1_CERTIFICATES_YOU_HAVE"
    }
  }
},

Hope it helps.

Renz

Check out my apps that could help and or entertain you:
1. Get Doaily: a gamified to do list that will help you build a habit of making every day count.
2. Play Roguesphere: shove foes and conquer worlds with one finger!
3. Play Rainy Day: a financial casual education game.

//Supporters

Special thank you shout out to the following ongoing generous supporters of my work, making a difference in the world and mine.

  • Laura Milligan
  • Andrew Abrook
  • Armaigne Rivero
  • Fritz Rivero
I contribute 10% of your support on here to carbon removal.