Search code examples
flutterfirebasedartfirebase-authenticationgoogle-signin

Google sign in not working in release version after adding sha keys from google console


I have this error after creating release version: PlatformException(sign_in_failed, com.google.android.gms.common.api.b: 10: , null, null).

I know that 10 means that it is developer error which most of the times indicates problems with SHA-1 keys. I can't solve it for 3 days straight.

What I tried:

  • Added debug and 2 SHA-1 keys from google play console
  • Created release SHA-1 key and added it to Firebase console aswell
  • Downloaded new google-services.json and replaced it
  • Manually added support email in google cloud console

I would be more than happy to get any ideas that could solve my problem!


Solution

  • I have found my solution.

    While I was developing my app I have changed package name, but I didn't notice that with every new added SHA-1 key the OAuth ID package name stayed with the basic one (com.EXAMPLE.appname). Changed it and everything works fine!! Saving the answer for anyone else struggling.