【问题标题】:com.google.firebase.auth.FirebaseAuthException: This app is not authorized to use Firebase Authentication.com.google.firebase.auth.FirebaseAuthException:此应用无权使用 Firebase 身份验证。
【发布时间】:2018-05-02 19:29:21
【问题描述】:

我交叉检查了所有 SHA-1 也是正确的,以及我使用真正的 android 设备的包名,但仍然显示此错误。

onVerificationFailed com.google.firebase.auth.FirebaseAuthException: This app is not authorized to use Firebase Authentication. Please verifythat the correct package name and SHA-1 are configured in the Firebase Console. [ App validation failed. Is app running on a physical device? ] at com.google.firebase.auth.api.internal.zzce.zzb(Unknown Source) at com.google.firebase.auth.api.internal.zzdf.zza(Unknown Source) at com.google.firebase.auth.api.internal.zzdg.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6095) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 以下是 SHA-1 的屏幕截图:

上面是我的包名

【问题讨论】:

  • 你知道这有什么问题吗?我与客户面临同样的问题。我可能建议不要在模拟器中使用它,因为它在模拟器中不起作用
  • 尝试here描述的详细解决方案,我的问题是更新SHA1字段后,我的项目中下载并更新google-services.json文件失败。

标签: android firebase firebase-authentication


【解决方案1】:

我最近遇到了同样的问题。如果您的应用在 Play 商店中,我会告诉您添加 Play 商店提供的 SHA-1。但由于它只是一种调试模式。请确保您拥有最新的 SHA-1,因为它可能会根据某些因素而改变。

【讨论】:

  • 但我交叉检查了许多相同的内容,您知道它可以更改的任何原因,因为一旦安装了 apk,如何更改它
  • 如何查看 play store 提供的 SHA-1 ?
【解决方案2】:

这个问题只发生在我的OPPO手机上。我猜一些中国手机制造商根Android系统所以手机被检测为模拟器? 无论如何,从 google play 到 firebase 的 SHA-1 都适合我。

您可以从 Google Play 控制台 -> 发布管理 -> 应用签名中找到 google play SHA-1。

只需将那些 SHA-1 复制到 firebase。

用于 Firebase 控制台。转到“项目设置”。您可以从 google play 中找到粘贴 SHA-1 的位置。

【讨论】:

    【解决方案3】:

    确保 playstore 和 firebase 仪表板中的 SHA1 密钥相同

    【讨论】:

      猜你喜欢
      • 2018-08-04
      • 2018-12-29
      • 2020-04-14
      • 1970-01-01
      • 2018-01-24
      • 2020-01-24
      • 2021-06-18
      • 2016-10-06
      相关资源
      最近更新 更多