Skip to main content

SHA-1 Certificate Fingerprints

SHA-1 certificate fingerprints are required for Google Sign-In and other Google services in React Native applications. This guide covers different methods to obtain these fingerprints depending on your development and deployment setup.

Reference

For detailed information, see the React Native Google Sign-In documentation.

Methods to Generate SHA-1 Certificates

1. Using Expo EAS Build

When using Expo EAS for building your app:

Option A: CLI Command

eas credentials

Option B: Expo Dashboard

  1. Go to Expo.dev dashboard
  2. Navigate to your project
  3. Open the Credentials section
  4. Select Android to view your SHA-1 fingerprints

2. Google Play Store (Production Apps)

When releasing through Google Play Store with App Signing enabled:

  1. Check if "Google Play App Signing" is enabled in the Google Play Console
  2. Navigate to: Your AppRelease (sidebar) → SetupApp Signing
  3. Note both SHA-1 certificate fingerprints:
    • App signing key certificate (used for production)
    • Upload key certificate (used for uploads)

Important: Google Play may have multiple "App signing key certificates" - make sure to include all of them.

3. Local Development

For local development and testing:

Option A: Using Keytool

# From your project root
keytool -keystore android/app/debug.keystore -list
# Password: android

Option B: Using Gradle

# From your project root
cd android && ./gradlew signingReport

Look for the fingerprints in the output:

  • Debug fingerprint: Used for locally-built debug APKs
  • Release fingerprint: Used for release APKs

Custom SHA-1 Certificates for Local Development

By default, the yarn prebuild command generates a universal SHA-1 certificate in the Android folder. However, you can customize this for local development.

Generating Custom Certificates

You can either:

  1. Generate a custom certificate for local development
  2. Import certificates from your Expo.dev project

Useful Resources

Best Practices

  1. Keep track of all fingerprints - You may need multiple SHA-1 fingerprints for different build types and environments
  2. Update Firebase/Google configuration - Add all relevant SHA-1 fingerprints to your Firebase project
  3. Test thoroughly - Verify Google Sign-In works across all environments (development, staging, production)
  4. Document your setup - Keep a record of which SHA-1 fingerprints are used for each environment

Troubleshooting

  • If Google Sign-In isn't working, verify that all necessary SHA-1 fingerprints are added to your Firebase project
  • For production issues, ensure you're using the correct App Signing key fingerprint from Google Play Console
  • For local development issues, verify you're using the correct debug keystore fingerprint