问题描述
Firebase身份验证工作正常,调试版本突然开始失败,没有任何代码更改,记录了以下消息
Firebase auth was working fine, the debug build suddenly started failing without any change of code, logging the folloing message
成功登录和失败之间唯一值得注意的动作是android studio升级.
The only notable action inbetween a successful login and failure is android studio upgrade.
推荐答案
更新Android Studio时,用于签署调试应用程序的调试密钥可能已更改.只需在Firebase控制台中添加调试密钥的新SHA-1校验和即可.
When you updated Android Studio, the debug key which is used to sign debug apps might have changed. Just add the new SHA-1 checksum of your debug key in the firebase console.
最简单的方法是从以下位置连接/同步到Firebase
Easiest way would be to connect/sync to firebase from
如果要手动执行此操作或为发布密钥库执行此操作,请首先使用以下命令生成SHA-1校验和:
If you want to do it manually or for release keystore, first generate SHA-1 checksum using following command:
keytool -list -v -keystore KEYSTORE_PATH -alias ALIAS_NAME
然后复制SHA-1校验和并转到:
Then copy the SHA-1 checksum and go to:
有关更多信息,请阅读本指南:对您的客户端进行身份验证|适用于Android的Google API
For more info, read this guide: Authenticating Your Client | Google APIs for Android
这篇关于此应用无权使用Firebase身份验证.请验证是否在Firebase控制台中配置了正确的软件包名称和SHA-1.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!