2

I am have a flutter app that uses firebase for auth. sign-in with google works in debug mode, but not in release mode. This is most likely an issue with signing with firebase.

Debug environment - WORKING:

buildTypes {
   release {
       signingConfig signingConfigs.debug
   }
}

Release mode - NOT WORKING (Google Sign in)

signingConfigs {
   release {
       keyAlias keystoreProperties['keyAlias']
       keyPassword keystoreProperties['keyPassword']
       storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
       storePassword keystoreProperties['storePassword']
   }
}
 buildTypes {
   release {
       signingConfig signingConfigs.release
     }
 }

I am pretty sure the issue is related to signing. I am using the release keys shown in the google play console here

and the same keys in firebase, I was sure to update the json file when I made the changes here

In Debug mode, I use the debug.keystore keys, while in the release version, I am using the keys generated from the app, which I find in the google play console. they are also found in the signing report in android studio.

So I need help figuring out how to get my release version of the app working with firebase auth. I would appreciate any help anyone can give. Thank you - Joseph

josep3534
  • 131
  • 2
  • 8

2 Answers2

3

Try these things and I hope it will solve your problem.

  1. Try to verify your SHA-1 key is still corresponding between your app and firebase.

  2. Go to your firebase console, download a new version of the google-services.json file and replace the former one by it.

  3. Delete the account (e.g: user@gmail.com) you're trying to connect with from the firebase authentication console.

Amon C
  • 1,710
  • 9
  • 17
  • Thanks for the response, however when I remove any accounts from the authentication page, and I try to sign in again, my accounts pop up on the phone, but when I click my account, google returns an error code 10. The account does not show up in firebase because an error was returned. – josep3534 Aug 28 '20 at 23:17
2

I did not put all thee keys into firebase, just the private and the one from the google play store, but not the release key

josep3534
  • 131
  • 2
  • 8
  • Can you please Explain what others keys did you use ? all i can find is the App signing key in google play console, where do you get the release one ? – Mohamed Abarri May 09 '23 at 18:57