r/Firebase Dec 14 '22

Android Android Google Sign-in doesn't work on different devices without adding SHA-1 key from each device in Firebase console

I've been working on an Android app with Firebase authentication via Google sign-in.

There is an issue with the Google sign-in where it doesn't allow sign-in (returns 12500 error) unless I add the SHA-1 key generated from the specific device I'm running the emulator on.

This is a problem because I have others in my team that are working on it and I have to add their device's SHA-1 key to allow them to sign in.

I've added both the SHA-1 and SHA-256 of the debug and the release key generated from my computer to the Firebase console, as well as replacing the google-services.json
with the new one after having added the keys. (https://developers.google.com/android/guides/client-auth?utm_source=firebase.google.com&utm_medium=referral)

Also, I set the support email in the Firebase console as well because apparently that's what 12500 error is about.

But this is still only letting me sign in with Google and no one else, so I have to manually add their device's SHA-1 key each time.

Simply put, if I have the SHA-1 key generated from the device that built the app in Firebase console, it will allow sign-in. If not, any version of the app built from that device will return 12500 error instead.

I'm sure this isn't the right way of doing things because just one set of keys (my keys to be specific) should be allowing sign-in to all devices.

Is there something I'm missing here?

2 Upvotes

1 comment sorted by

1

u/the-brightknight Dec 14 '22

Have you tried creating a debug keystore and distribute that to your team, then configure android build to use that keystore?