Troubleshooting Supabase Google Sign-In Integration (Expo React Native)
Getting "DEVELOPER_ERROR" or "[AuthApiError: Passed nonce and nonce in id_token should either both exist or not."?
Doaily
Doaily is my gamified to-do list system turned into a real app to help you stay accountable and get things done.
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:
- Navigate to the specific app on your Google Play Console
- In the menu, find Release and go to App signing under Setup
- Copy the SHA-1 certificate fingerprint provided for App signing key certificate
For development builds, to fix the code 10 error of "DEVELOPER_ERROR":
- 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:
- Navigate to APIs & Services for your project in Google Cloud
- Navigate to Credentials
- Create credentials
- Select Android for Application type
- Add a name that you want
- The correct Package name for your project
- Paste the SHA-1 certificate from the Google Play Console app signing key certificate
- Press Create
- Create credentials
- Copy the Client ID that was just generated
Supabase Dashboard
- Navigate to Authentication -> Providers under Configuration -> Google
- 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] - 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
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