我有一个使用 firebase 进行身份验证的 flutter 应用程序。使用 google 登录可以在 Debug模式下使用,但不能在 Release模式下使用。这很可能是使用 firebase 签名时出现的问题。
调试环境 - 工作中:
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
Release模式 - 不工作(Google 登录)
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
我很确定该问题与签名有关。我正在使用 google play console here 中显示的释放键
和 firebase 中的相同键,我确信在进行更改时更新了 json 文件 here
在 Debug模式下,我使用 debug.keystore key ,而在发布版本中,我使用从应用程序生成的 key ,我可以在 google play 控制台中找到该 key 。它们也可以在 android studio 的签名报告中找到。
所以我需要帮助弄清楚如何让我的应用程序的发布版本与 firebase auth 一起使用。我将不胜感激任何人可以提供的帮助。谢谢你 - 约瑟夫
最佳答案
尝试这些方法,希望它能解决您的问题。
尝试验证您的 SHA-1 key 在您的应用与 火力基地。
转到您的 Firebase 控制台,下载新版本 google-services.json 文件并用它替换前一个。
删除帐户(例如:[email protected]) 您正在尝试通过 firebase 身份验证进行连接 控制台。
关于firebase - Firebase Flutter 应用程序在 Release模式下无法登录 Google 签名问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63641704/