Generate SHA-1 & SHA

9. Generate SHA-1 & SHA-256 Keys

SHA fingerprints are required for Google Sign-In and Phone (OTP) authentication on Android. Add the fingerprints for both your debug keystore (for testing) and your release keystore (for the Play Store build).

9.1. Using Gradle (recommended)

From the android folder of the project:

# macOS / Linux
./gradlew signingReport
# Windows
gradlew signingReport

The report lists the SHA-1 and SHA-256 values for each build variant.

9.2. Using Keytool

# Debug keystore
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
# Password: android
# Release keystore
keytool -list -v -keystore path/to/your-release-key.jks -alias your-key-alias

9.3. Add the keys to Firebase

  1. Open Firebase Console → Project Settings → Your apps → Android app.
  2. Click Add fingerprint and paste the SHA-1; repeat for the SHA-256.
  3. Download the refreshed google-services.json and replace the one in android/app/.