https://docs.flutter.dev/deployment/android
After following the above steps, you must generate sha1 key for google login to work.
In order to generate the SHA1 key, go to terminal and run the following command:
To add an SHA-1 key to your Firebase project for Google Login, follow these steps:
Step 1: Get Your SHA-1 Key
The method to retrieve your SHA-1 key depends on how you’re developing your app:
For Debug SHA-1 (Android Studio)
- Open a terminal in Android Studio.
- Run the following command:
./gradlew signingReport - Look for
SHA1under thedebugsection.
For Release SHA-1 (Production APK)
- If using a release keystore, run:
keytool -list -v -keystore path-to-keystore.jks -alias your-key-alias -storepass your-store-password -keypass your-key-password- Replace
path-to-keystore.jkswith your actual keystore file path. - Replace
your-key-alias,your-store-password, andyour-key-passwordwith your credentials.
- Replace

For Play Store (If Using App Signing by Google Play)
- Go to Google Play Console.
- Navigate to Setup > App Integrity.
- Copy the SHA-1 certificate fingerprint.
Step 2: Add SHA-1 Key in Firebase Console
- Go to Firebase Console.
- Select your project.
- Click on the settings icon ⚙️ > Project settings.
- Go to the “General” tab.
- Scroll down to “Your apps” and select the Android app you registered.
- Under “SHA certificate fingerprints,” click “Add Fingerprint.”
- Paste the SHA-1 key you obtained earlier.
- Click Save.
Now your app should be able to authenticate users using Google Sign-In! 🚀