google-signin: Cannot get signIn() working with Supabase
- Explain the steps we need to take to reproduce the issue.
Hi! Trying to call .signIn(). I’m using Expo & react-native. I get the DEVELOPER_ERROR issue. I have carefully followed all the docs from Supabase and from this repo, including reviewing all of the FAQ/troubleshooting/common causes of the DEVELOPER_ERROR. The code is simple:
GoogleSignin.configure({
webClientId: '...'
})
await GoogleSignin.hasPlayServices()
const userInfo = await GoogleSignin.signIn() // < fails here
I can get this to work in a development build only using the OAuth web flow – by creating a web type key in Google Cloud, then copying the client key and secret into Supabase, and providing that web client ID into the .configure() method. However, this does not work in a production build – I get the DEVELOPER_ERROR.
Alternatively I’ve tried creating an Android-type key in GC (this is what Supabase docs tell you to do) with a SHA-1. So create an Android key in GC, give it a SHA-1, copy its client ID, and pass that into .configure(). However, none of these keys/SHA-1s work either in development or production. I’ve tried SHA-1s from the following sources:
./gradlew signingReportand taking the “:app:signingReport” SHA-1 key. It’s the same for me for debug & release.eas credentialsand taking “SHA-1 Fingerprint” in the development, preview, or production options (again all 3 are the same SHA-1 key, although different from the key above from gradle)keytool -list -v -keystore ~/.android/debug.keystoreand taking the “SHA1 certificate fingerprint”, again different from the other two- Going to the Google Play developer console > App Signing > SHA-1 certificate fingerprint, again it’s different
What am I doing wrong in my config here? Totally stuck. I’m further confused by the fact that the docs for this module say that you can only pass a “web client”, not “Android” type GC key to the “webClientId” arg of .configure() (that part makes sense) – but… the only way in GC that you can set a SHA-1 is on an Android-type GC key. So how am I supposed to be setting up a SHA-1 if I’m using a web client auth key in GC, not Android? Where am I linking an Android key, with a SHA-1, to my react-native-google-signin config, if I never pass in its client ID?
Right now in GC I have the web key set up and 4 different Android keys representing the 4 SHA-1s above, I’ve entered all that into Supabase, and yet I still can’t get the sign in working by passing in any of the 5 corresponding client IDs as the webClientId arg of configure() – except the web client key, in development builds only.
Given that the call fails before I even interact with Supabase I’m assuming it’s upstream from that, but again this confuses me since the docs for this module, when discussing Firebase, mention that the DEVELOPER_ERROR is usually an issue with the Firebase config (presumably it would be similar with Supabase).
Thanks so much in advance for any assistance and apologies if anything is not clear or done according to convention, happy to do whatever additional work is needed to receive guidance.
Expected Behavior
signIn() method should succeed and return a token to log in with Supabase.
Actual Behavior
signIn() method returns DEVELOPER_ERROR
Environment
- react-native version: 0.74.2
- @react-native-google-signin/google-signin version: 12.2.1
- Gradle version 8.6. Not sure how to get Android version after a lot of Googling… Android studio says version 17.0.7 (Hedgehog).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22
Hello and thanks for reporting, I have pushed (yet another) update of the docs that should clarify the setup and also troubleshooting. If you feel the docs are not good enough, feel free to suggest changes to them here: https://github.com/react-native-google-signin/docs
To give an answer on the issue:
With DEVELOPER_ERROR, the error happens before supabase gets into play. You need to add these values to google cloud console first.
You’re not. The app is identified by its package name and hash of the certificate fingerprint.
Hope this clarifies it. I’m going to close this because the OP got it working and the docs are now better. Thank you 🙂
Hey there, thanks for the response! Unfortunately I’m not using Firebase, so I don’t believe I have a google-services.json file at all. I’m using Supabase, which I believe doesn’t require this. If I’m mistaken please let me know. Thanks again.
Try to add your SHA-1 to
app.jsonhttps://stackoverflow.com/a/67922139
I just did this today, had some issues with Android until now when I (think) I figured it out.
I’m using Expo / EAS / Sponsor version (but I think it should be pretty much the same in the non-paid)
eas credentials-> SelectAndroidbuild profileSHA1 Fingerprint-string and add it to yourClient ID for Androidcredential underSHA-1 certificate fingerprintin the gooogle cloud console.Package nameand save the android credential in Google cloud.credentials.json: Upload/Download ...andDownload credentials from EAS...I assume this is needed when running your dev-server, not sure.eas credentials**apps.googleusercontent.comfor anything. It just need to be created in google cloud console and have a validSHA1 FingerprintWeb application Client IDin your app inwebClientIdin your code and also in Supabase Google provider in the fieldClient ID (for OAuth).build profileyou selected and used in steps2and3This worked for me, and then you do the same process for each type of build.
For anyone running into this in 2025: I had to add my web client ID in both the supabase dashboard, and webClientId in @react-native-google-signin/google-signin
configurefor my android sign-in to work (As well as match the correct SHA-1’s).Yep for me 🤞 it was the Play Store SHA1 for the android client too. Not seen any errors since.
Can confirm this works. In my case I got the sha1 using this command:
keytool -list -v -keystore ./android/app/debug.keystore -alias androiddebugkey -storepass android -keypass androidI’ll also mention I started getting this on local builds doing
expo run:androidand it was only after I started configuring android app links. Not sure if it’s a coincidence.@vonkanehoffen Ugh thanks for the heads up, I will check that and make sure there’s a Sentry log there or something. Good luck with it and let us know if you uncover anymore info as to the cause.
Thanks everyone for chiming in. I have an update which is not likely to be all that helpful – all of a sudden, it has started working for me. I did not change a single thing. Basically I just set this aside for a couple of weeks, came back to it, and it’s working. I wonder if there was just some hours-long propagation time for some piece of the puzzle here and all that was needed was to let it settle in the correct configuration? Given how unclear all the instructions are, perhaps we’re all tweaking and fiddling with it and never getting a chance to see if it works in any given configuration. Anyway here is my final setup, just for reference. Again nothing has changed since the start:
webClientIdargument in.configureThat’s it. It didn’t work for hours and hours of me playing around with it, I let it sit for a couple weeks, now it works. Anyway hope this helps some other folks. Unfortunate that neither Supabase nor rn-google-signin don’t have these instructions plainly spelled out anywhere…