Whenever you are using any google api you must add your release hash key on the app you generated in google developer console if you have added hash key for debug.
Make sure you follow all the steps specified in the Guide
. If need be, create a new OAuth Client, new configuration file (the google-services.json) file and do everything step-by-step.
Also try adding a Web Client giving the same credentials.
And for Android as well as Web client give both the SHA1 for debug as well as the release keystores.
In Android Studio, at extreme left you will see a tab saying "Build Variants". Select the release mode there and do everything after that.
Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your firebase account.
For a Release (aka, Signed) APK - if you are only deploying to Firebase, you need to add the SHA1 for the same keystore file you used to sign the app.
After successfully adding the SHA1 into the Firebase Project console , get the latest google-services.json and update your project's module local copy.
I didn't see any docs on this so far (seems it's something you have to dig for); found it to be tricky stuff. Lot's of answers on SO. Found the Firebase deployment solt. thanks to:
Because you are asking about release version of android so I assume you already have signed your application with keystore.
So in order to obtain the SHA1 of your release app.
Go to your /bin in JDK directory.
And run the following command in your cmd.
keytool -list -v -keystore "key store path" -alias "key alias"
This command will give you all the required details of your release version.
Copy the SHA1 string and add it to your firebase console.
If you have two or more firebase projects or the google cloud project, there may be a duplicate SHA1. If such conditions have been explained in this link.
Ok I struggled with this and finally I found the solution here it is:
First of all there are three SHA1 keys
Debug SHA1 key
Release SHA1 key
SHA1 key when you google play sign your app
Here you can get debug and release keys and for third key check HarshitG's answer.
There is App signing certificate, this is that key.
Gather those three keys and add them in firebase console under SHA certificate fingerprints
Then Download the google-services.json file and add it in your YOUR_PROJECT_NAME/project/app/ [you'll see it if you change the view to Project from Android]
in the terminal go to the project folder->android-> paste this command and hit enter ./gradlew signingReport . this will generate set of keys for you .
Then copy the SHA1 and SHA256 keys under release release label.
add them in to your Firebase settings keys section.
Download the googleServices.json and replace your existing googleServices.json with the new one and build the apk again.
Best And fastest way to fix login social media by flutter application using firebase after upload the app in google play to solve problem
go to google play console than setup > app integrity > from App signing key certificate copy sha1& sha256 and past in firebase account in android app add new sha1 and sha256 .
for facebook error login also copy sha1 from App signing key certificate in google play console go to this website : http://tomeko.net/online_tools/hex_to_base64.php
past in hex string and click covert than copy output base 64 and past inside app setting in facebook development
If exist you put more than one identifier for the same 'signingReport' (copy SHA1 and SHA256 from the same report object) this isn't work, keep this im mind.
This works for me:
Remove all SHA1 in firebase
Run ./gradlew signingReport in android folder and get SHA1 from debug mode.
Run this commmand with your data:
keytool -list -v -keystore your_absolute_path_to_keystore -alias your_alias_from_keystore
(After that you will be promped to digit the password of key and it
wil generate your SHA1 + SHA256 and other infos.)
Copy only SHA1 and paste it in firebase.
Download google-services.json again and move it to your android/app