Home > Net >  Flutter: How to define which debug keystore an Android app should use?
Flutter: How to define which debug keystore an Android app should use?

Time:09-16

I'm writing a Flutter Android app using Firebase auth.

I'm having a sign_in_failed error. I know it's because I need to add the SHA fingerprints in the Firebase console.

I was able to generate the keystore for debugging. But I have no idea how to associate this debug keystore with the Android project.

How to define which debug keystore an Android app should use?

CodePudding user response:

You will already have a debug keystore (Android Studio generates one automatically) for your apps.

Just run ./gradlew signingReport on the command line in the android project root.

This will display all signing keys including the SHA for the current debug keystore which is used to sign debug apps. Just copy that debug SHA into the Firebase console, which is located at:

Project -> Top Left Cog -> Project Settings -> General -> Your Apps -> Android Apps -> Your App -> Add Fingerprint

At some point you can create a release key and do the same procedure (making sure you build the apk using that release keystore - setup in the app build.gradle file under signing configs - more info here : https://developer.android.com/studio/publish/app-signing#sign-auto), however if you use Google play signing for your distributed apps you'd use the SHA from their signing key which is available within the Play Console at :

All Apps -> Your App -> Setup -> App Integrity -> App Signing

  • Related