Photo by Dmitry Chernyshov on Unsplash

React Native Notes 29: Firebase Google Sign-in Problem on Android APK

Kuray Ogun
FreakyCoder Software Blog
2 min readMar 31, 2022

--

Cringe Firebase Google Sign-in with debug and release APK

Yes, you correctly setup the react native firebase with google sign-in but you still get the error on both debug and release APK. I know it’s very annoying to debug and find the problem.

Let’s save some souls to prevent waste more time 😇

DEVELOPER_ERROR

Google Sign-in Error

SHA-1 and SHA-256 Keys Solution

You probably already added your SHA-1 and SHA-256 keys however, you might be generated from wrong .keystore

Please go and check debug.keystore inside -> android/app/debug.keystore

correct debug.keystore

That’s the one keystore which we will use for generating the SHA-1 and SHA-256 keys.

Simply run this command:

keytool -list -v -keystore /Users/username/project-path/android/app/debug.keystore -alias androiddebugkey -storepass android -keypass android

This is the example path, please becareful with the correct path! You should use full path to generate the keys.

command to generate SHA-1 & SHA-256

You will simply copy-paste the generated SHA-1 and SHA-256 to Firebase.

Firebase add SHA-1 & SHA-256

Now, just re-try on your Google Sign-in, it should work now :)

Correct Client Id

If you have the correct SHA-1 and SHA-256, then you should check clientId . It should be the Web Client ID not android client id. This is a common mistake.

Please just double, triple check your webClientId before anything else

It should work Google Sign-in with the APK now 🥳

If you have question, feel free to ask

--

--