[英]Facebook and Google login doesn't work for Android AAB build uploaded to Firebase App Distribution
Solved : The Firebase troubleshooting page has been updated:已解决: Firebase 故障排除页面已更新:
When you upload an AAB to App Distribution, Google Play automatically resigns the generated APK using a test app signing key certificate.当您将 AAB 上传到 App Distribution 时,Google Play 会使用测试应用签名密钥证书自动对生成的 APK 进行签名。 When prompted, you must register your app with API providers if you want to continue using their third-party services.出现提示时,如果您想继续使用他们的第三方服务,您必须向 API 提供商注册您的应用程序。 Once signed, your app's test certificate can be viewed in the Firebase console.签名后,您可以在 Firebase 控制台中查看您应用的测试证书。
Since I started to upload AAB instead of APK on Firebase App Distribution, I've noticed Facebook and Google authentication were not working anymore.由于我开始在 Firebase App Distribution 上上传 AAB 而不是 APK,我注意到 Facebook 和 Google 身份验证不再起作用。
In my Firebase's Android app settings, I've alreay added the SHA-1 fingerprints below:在我的 Firebase 的 Android 应用程序设置中,我已经在下面添加了 SHA-1 指纹:
./gradlew signingReport
)调试(来自./gradlew signingReport
)./gradlew signingReport
)发布(来自./gradlew signingReport
)I've also uploaded their associated base64 hash keys inside the Meta (Facebook) Developers console.我还在 Meta (Facebook) Developers 控制台中上传了他们相关的 base64 hash 密钥。
Everything was working as expected until I started to upload AAB instead of APK.在我开始上传 AAB 而不是 APK 之前,一切都按预期工作。 For instance, when I try to login with Facebook, the following error message is displayed:例如,当我尝试使用 Facebook 登录时,会显示以下错误消息:
Invalid key hash.无效的密钥 hash。 They key hash <key_hash> does not match any stored key hashes.他们的密钥 hash <key_hash> 与任何存储的密钥哈希不匹配。 Configure your app key hashes at https://developers.facebook.com/app/ <facebook_app_id>/在https://developers.facebook.com/app/ <facebook_app_id>/ 配置您的应用程序密钥哈希
From this key hash, I've been able to retreive its associated SHA-1 fingerprint.从这个密钥 hash,我已经能够检索其相关的 SHA-1 指纹。 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. 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?但问题是:最初我应该在哪里找到这个 SHA-1 指纹? It is not available from ./gradlew signingReport
output nor Google Play Console. ./gradlew signingReport
output 和 Google Play 控制台均不提供此功能。 I cannot find any documentation either.我也找不到任何文件。
Thank you in advance for your help.预先感谢您的帮助。
Firebase App Distribution re-signs your AAB when uploading. Firebase App Distribution 会在上传时重新签署您的 AAB。
"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..." “第一次上传 AAB 后,App Distribution 会生成一个新的测试证书。所有 AAB 上传都使用此测试证书重新签名。使用下面的证书指纹向 API 提供商注册您的应用签名密钥......”
Here are the screenshots of the Firebase Console where you will find this info:以下是 Firebase 控制台的屏幕截图,您可以在其中找到此信息:
After adding these SHA-1 and SHA-256 fingerprints on your Firebase Project Settings, you should be good to go.在您的 Firebase 项目设置上添加这些 SHA-1 和 SHA-256 指纹后,您应该对 go 很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.