React Native Notes 29: Firebase Google Sign-in Problem on Android APK
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
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
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.
You will simply copy-paste the generated SHA-1
and SHA-256
to Firebase.
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