简体   繁体   English

Facebook 和 Google 登录不适用于 Android AAB 构建上传到 Firebase 应用程序分发

[英]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 指纹:

  • Debug (from ./gradlew signingReport )调试(来自./gradlew signingReport
  • Release (from ./gradlew signingReport )发布(来自./gradlew signingReport
  • Google Play Store (from Google Play Console > Release > App Integrity) Google Play 商店(从 Google Play 控制台 > 发布 > 应用完整性)

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 控制台的屏幕截图,您可以在其中找到此信息:

Firebase 控制台上的 AAB 签名信息

测试证书指纹

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.

相关问题 从 Firebase 上传应用到 Google Play Android - Upload App From Firebase App Distribution to Google Play Android 当 WiFi 开启时,Android 应用程序无法运行。 (使用 Firebase 和 Admob) - Android app doesn't work while WiFi is on. (With Firebase and Admob) Firebase 在 Android Studio 模拟器上不起作用 - Firebase doesn't work on Android Studio Emulator Google App Engine 不适用于安全帽 - Google App Engine doesn't work with Hardhat list() 在 Google App Engine 中不起作用? - list() doesn't work in Google App Engine? “google-cloud-firestore”发行版未添加到 PyInstaller 构建中 - 'google-cloud-firestore' distribution doesn't get added to PyInstaller build 当 apk 来自 Firebase App Distribution 时,Google 登录(OAuth)不起作用 - Google sign in(OAuth) does not work when the apk is from Firebase App Distribution 在 Firebase 应用程序分发中链接到 Google Play 的问题 - Issue Linking to Google Play in Firebase App Distribution 我正在尝试使用 Firebase 在 Flutter 中使用 Google 注销,但它不起作用 - I'm trying to signOut with google in Flutter with Firebase and it doesn't work React Native Firebase 注销 function 在根据用户类型登录后不起作用 - React Native Firebase logout function doesn't work after login based on user type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM