androidandroid-gradle-pluginfirebase-authenticationfluttersha1

Flutter - Get SHA-1 Certificate - Android Studio 3.2.1


I'm trying to retrieve the SHA-1 Fingerprint Certificate for my Flutter Project. This can usually be done going into the Gradle Panel on the right side in Android Studio and clicking on signingReport.

The problem is however, in Flutter, it doesn't show the Gradle Panel at all and after an hour of searching, I still couldn't find a way to get that panel to show.

I tried the Keytool way, but it tells me there's no such command in the Command Prompt. How do I get the SHA-1 Certificate for my flutter project? I need it for signing in my Flutter Project with Firebase Auth.

I've also searched in the Firebase Documentation, there is no documentation of how to find the SHA-1 in flutter. It simply says that SHA-1 is required for using Firebase Auth.

Related issue https://github.com/flutter/flutter/issues/24776


Solution

  • I had the same problem, to get the SHA-1 there are two ways:

    1. Using Keytool (didn't work with me)
    2. Using Gradle's Signing Report , which I used ,FIrst on terminal go to android folder with command:
    cd android               
    

    and the following command to get the report:

    ./gradlew signingReport
    

    then it will show the signingReport which you can retrieve the SHA-1 from it.

    enter image description here