Posted in API Firebase Flutter

Flutter – How to Get ‘Signing Certificate SHA-1″ Hash for Firebase

Flutter – How to Get ‘Signing Certificate SHA-1″ Hash for Firebase Posted on May 13, 2020Leave a comment
I'm Hari Prasad Chaudhary from Nepal, developer of the finest educational website/app "MeroSpark" and the finest eCommerce system "PasalaY". Here I share the code snippet which I learn during development.

Are you integrating Firebase in flutter for Authentication and other products which need SHA-1 hash for signing Certificate which needs to be entered in the field shown on the picture, then hit the command given below.

sha-1 certificate

Okay, let’s generate the SHA-1 hash for Flutter App, for that first open terminal in Android Studio or VS Code. Then you need to change directory to android/ folder. Hit following command to do that.

cd android

It will change the directory to android folder.

vs code terminal

If you have already generated key file (For eg. key.jks), then hit the following (Recommended for Google Sign In) :

keytool -list -v -keystore app/key.jsk -alias alias_name

If you do not have generated key.jks file then, hit the command below.

gradlew signingReport
// if this does not works hit the following

gradle signingReport
//if this does not works hit the following
//this also works for one-time/Ubuntu

./gradlew signingReport
//this works for me on Linux/Ubuntu

If the first command does not work, then hit the second one on the terminal. Then you will see the output like below.

Copy any of SHA-1 hash, if your carefully see, all SHA-1 are same, therefor copay one and use it during creating Android App on Firebase Console. You can copy other MD5 and SHA-256 key.

I'm Hari Prasad Chaudhary from Nepal, developer of the finest educational website/app "MeroSpark" and the finest eCommerce system "PasalaY". Here I share the code snippet which I learn during development.

Leave a Reply

Your email address will not be published. Required fields are marked *