Fixing `PlatformException (PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null))` when calling GoogleSignIn.signIn()
I got this issue when setting an existing project on a new machine. Based on this StackOverflow post, what I needed to do was:
- add my machine's Android Studio debug key to the list of whitelisted keys in Firebase's Android app.
- download the updated google-services.json to android/app.
To get the SHA-1 key, you can either use
keytool as explained in https://developers.google.com/android/guides/client-auth, or run
./gradlew signingReport. I did the latter.