Solved: The Firebase troubleshooting page has been updated:
When you upload an AAB to App Distribution, Google Play automatically resigns the generated APK using a test app signing key certificate. When prompted, you must register your app with API providers if you want to continue using their third-party services. Once signed, your app's test certificate can be viewed in the Firebase console.
Since I started to upload AAB instead of APK on Firebase App Distribution, I've noticed Facebook and Google authentication were not working anymore.
In my Firebase's Android app settings, I've alreay added the SHA-1 fingerprints below:
./gradlew signingReport
)./gradlew signingReport
)I've also uploaded their associated base64 hash keys inside the Meta (Facebook) Developers console.
Everything was working as expected until I started to upload AAB instead of APK. For instance, when I try to login with Facebook, the following error message is displayed:
Invalid key hash. They key hash <key_hash> does not match any stored key hashes. Configure your app key hashes at https://developers.facebook.com/app/<facebook_app_id>/
From this key hash, I've been able to retreive its associated SHA-1 fingerprint. After adding it to Firebase's Android app settings (and update google-services.json
file) and add the key hash in Facebook console, social authentication works.
But here is the question: where am I supposed to find this SHA-1 fingerprint initially? It is not available from ./gradlew signingReport
output nor Google Play Console. I cannot find any documentation either.
Thank you in advance for your help.
Firebase App Distribution re-signs your AAB when uploading.
"After you upload an AAB for the first time, App Distribution generates a new test certificate. All AAB uploads are re-signed with this test certificate. Use the certificate fingerprints below to register your app signing key with API providers..."
Here are the screenshots of the Firebase Console where you will find this info:
After adding these SHA-1 and SHA-256 fingerprints on your Firebase Project Settings, you should be good to go.