Setup - Add SHA Keys (Android & Web)
Step 7: Add SHA-1 and SHA-256 Keys
For Android apps to work seamlessly with Firebase (especially for authentication and security), you need to generate and add SHA-1 and SHA-256 keys to the Firebase Console.
Method 1: Using Terminal or Command Prompt
Open a terminal and run the following command:
keytool -list -v -keystore %USERPROFILE%\.android\debug.keystore -alias androiddebugkey -storepass android
Copy the generated SHA-1 and SHA-256 keys and add them to the Firebase Console under:
Project Settings > Your App > SHA Certificate Fingerprints.

Method 2: Using Android Studio
- Open your Flutter project in Android Studio.
- Go to the bottom panel in Android Studio and select the Terminal tab.

Navigate to the Android Folder
cd android
Run the Gradle Signing Report Command
Run the following command:
./gradlew signingReport
Check the Output
Once executed, you will see an output similar to this:
Task :app:signingReport
Variant: debug
Config: debug
Store: /Users//.android/debug.keystore
Alias: AndroidDebugKey
SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
SHA256: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Why is this Required?
Adding SHA-1 and SHA-256 keys is essential for:
- Firebase Authentication using Google Sign-In.
- Securing API requests and app integrity validation.
- Ensuring proper communication between Firebase and your Android app.