skip to Main Content

I’m trying to ensure that the SHA-1 key used in Firebase matches the one used in the Google Play Console for app signing. After uploading my release keystore’s SHA-1 to Firebase and signing the app for release, the Play Console generated a new SHA-1 key. This mismatch is causing issues with Firebase services like authentication and analytics. I need help understanding how to sync these keys or update Firebase/Play Console to use the same SHA-1 key without breaking app functionality.

I’m working on a Flutter app, and I need to ensure that the same SHA-1 key is used for both Firebase and the Google Play Console. Here are the details:

  1. I’ve generated a release keystore and added its SHA-1 to Firebase for authentication purposes.

  2. I uploaded the output.zip (created using the PEPK tool) to the Play Console for signing.

  3. Firebase seems to require the SHA-1 key from my original keystore, while Play Console uses a new key generated after uploading output.zip.

How can I ensure both platforms (Firebase and Play Console) use the same SHA-1 key? Is there a way to synchronize the keys or an alternative setup for this?

2

Answers


  1. To add the Play Console’s SHA-1 Key to Firebase for your Android app, follow these steps:

    Step 1: Retrieve the SHA-1 Key from Play Console

    • Go to the Google Play Console.
    • Select your app
    • Navigate to Setup > App Signing.
    • Scroll down to App signing key certificate
    • Copy SHA-1 certificate fingerprint
    • Paste it to firebase

    Step 2: Add the SHA-1 Key to Firebase

    • Open your Firebase project in the Firebase Console.
    • Navigate to Project Settings > Your apps.
    • Select your Android app and scroll to the SHA certificate fingerprints section.
    • Add the SHA-1 key from the Play Console.
    • Keep both SHA-1 key for debug and release mode

    Step 3: Rebuild and Redeploy the App

    • After adding the SHA-1 key to Firebase, rebuild your app and redeploy it to ensure the changes take effect.

    This will allow Firebase services like authentication and cloud messaging to work correctly with your Play Store app.

    If you encounter any issues, make sure you’ve added both the debug and release SHA-1 keys in Firebase.

    Login or Signup to reply.
  2. You may note that when uploading an apk/aab signed with KeyA (your key, the same key you’re using for firebase, also called upload key), then Google sign your app with the auto-generated key (KeyB, also called signing key) before distributing to user.

    enter image description here

    So you must add KeyB to your firebase too (go Play dashboard -> app signing -> you’ll find out KeyB) to make feature work correctly

    If you would like to use the same key, you can choose not to opt in to Play App Signing (but only for apps created before August 2021), more details here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search