【问题标题】:Please verify that the correct package name and SHA-1 are configured in the Firebase Console [duplicate]请验证在 Firebase 控制台中配置了正确的包名称和 SHA-1 [重复]
【发布时间】:2021-04-09 21:36:15
【问题描述】:

环境

firebase_auth: ^0.16.1
android 10
flutter: 1.17.5

构建发布应用

flutter build app
flutter install

Play 商店中的应用

search for "Renthusiast"

从 Android Play 商店下载应用时出现“未授权”错误。

如果在本地安装,则 Firebase 身份验证成功。

在 Firebase 控制台设置页面的“添加指纹”中注册了正确的包名称和 SHA-1 和 packageName/SHA-256。

This app is not authorized to use Firebase Authentication.
Please verify that the correct package name and SHA-1 are configured in the Firebase Console.
[ A safety_net_token was passed, but no matching SHA-256 was registered in the Firebase console.
Please make sure that this application's packageName/SHA256 pair is registered in the Firebase Console ] 

【问题讨论】:

    标签: android firebase flutter firebase-authentication


    【解决方案1】:

    我认为您尚未为发布签名密钥添加 SHA 指纹。 如果您选择了“让谷歌管理和保护您的应用签名密钥(推荐)”之类的选项,那么您应该进入 Play 管理中心,然后选择您的应用,进入设置下的应用签名(新版本的 Play 管理中心)。 您的指纹将在“应用程序签名密钥证书”下方可用,复制它,然后转到 Firebase 控制台,在您的项目中,进入项目设置,最后添加您复制的指纹。然后下载最新的 Google-services.json 文件并将其添加到您的项目中。 如果您尚未启用 Google 签名,则必须使用 keytool 从本地签名密钥(您使用的)中找到您的指纹,然后添加它。

    阅读:https://developers.google.com/android/guides/client-auth

    https://support.google.com/firebase/answer/9137403?hl=en

    【讨论】:

    • 线索是“让谷歌管理和保护你的应用签名密钥(推荐)”。使用谷歌的指纹有效。
    猜你喜欢
    • 2018-03-26
    • 2018-04-13
    • 2021-06-22
    • 2018-12-15
    • 1970-01-01
    • 2021-03-01
    • 2021-03-22
    • 1970-01-01
    相关资源
    最近更新 更多