Firebase UI 与 google 的身份验证失败并显示消息(代码:10 消息:10)

发布于 2025-01-17 02:00:42 字数 327 浏览 0 评论 0原文

我制作了一个使用 Firebase 功能实时数据库的聊天应用。 我遇到谷歌身份验证问题。当我从 Play 商店下载应用程序时,问题就开始了,当我在调试模式下运行应用程序时,身份验证工作正常。当用户尝试登录时,他们会收到一条 Toast 消息 code:10 message:10

我想在这里指出:我已经添加了 SHA1 指纹。我该如何解决这个问题?

*不确定这是否有帮助,但我已逐步按照此教程进行操作

I've made a chat app that uses Firebase's feature Real-time database.
I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10.

I would like to note here that: I've added the SHA1 fingerprint. How can I solve this?

*Not sure if this is helpful but I've followed step by step this tutorial

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

喵星人汪星人 2025-01-24 02:00:44

您需要三个键才能使其工作:

  1. 调试键。信息此处

  2. 释放键。信息此处

  3. Google Play 应用签名密钥。信息此处

为了使登录过程正常进行,需要所有这些密钥。

其他信息请参见此处

You need three keys in order to make it work:

  1. The debug key. Informations here.

  2. The release key. Informations here.

  3. Google Play App signing key. Informations here.

All these keys are needed in order to make the sign-in process work.

Other informations here.

白云悠悠 2025-01-24 02:00:44

为发布密钥生成 SHA1 后,我忘记下载导致相同错误的新 google-service.json 文件。

请务必按照说明进行操作 https://developers.google.com/android/guides/client -auth 生成调试/发布 SHA1 并将其添加到 Firebase 控制台,并在更新后下载 google-service.json。

如果您使用 Google Play 的应用签名选项,您需要一个额外的步骤:

将应用程序上传到 Google Play 控制台后,转到发布管理> >应用程序签名,复制 SHA1 并粘贴到 firebase 控制台
输入图像描述这里

更新

在新的 Google Play 控制台中,可以找到应用程序签名密钥,如下所示:
设置>应用签名
输入图像描述这里

After generating SHA1 for release key, I forgot downloading the new google-service.json file that caused the same error.

Make sure you follow the instruction https://developers.google.com/android/guides/client-auth to generate and add debug/release SHA1 to firebase console and download google-service.json after updated.

If you use Use app signing by Google Play option, you need an additional step:

After uploading app into google play console, go to Release management > App signing, copy SHA1 and paste to firebase console
enter image description here

Update

In the new google play console, the App signing key can be found as following:
Setup > App signing
enter image description here

幻梦 2025-01-24 02:00:44

确保您已添加签名的 SHA1。如果您使用的是 debug one,那么它将不适用于 live apk。

您需要将“debug.keystore”放在此路径 C:\Users\USER_FOLDER_NAME.android 中

,然后在 Android studio 中按照以下步骤操作
1. 运行你的项目
2. 单击 Gradle 菜单
3. 展开 Gradle 任务树
4.双击android->

您可以在“运行”选项卡中查看 SHA,

了解更多信息,请参阅链接

Make sure you have added signed SHA1. If you are using debug one then it will not gonna work for live apk.

You need to put "debug.keystore" in this path C:\Users\USER_FOLDER_NAME.android

then in Android studio follow the below steps
1. Run your project
2. Click on Gradle menu
3. Expand Gradle Tasks tree
4. Double click on android -> signingReport

You can see SHA in Run Tab

for more information see link

浪菊怪哟 2025-01-24 02:00:44

我遇到了这个问题,解决方案是:

1.在选项卡 Gradle ->双击签名报告->获取 SHA-1。

2.从 Android Studio 复制生成的 SHA-1,然后粘贴到 Firebase ->项目设置->常规设置-> SHA 指纹。

3.在项目设置 firebase 下载文件 google-service.json

4.在项目中添加文件 google-service.json 并重建。

I had this problem and the solution was:

1.In tab Gradle -> Double click signingReport -> get the SHA-1.

2.Copy this generated SHA-1 from Android Studio, then paste to Firebase -> Project Setting -> General Setting -> SHA FingerPrint.

3.In Project settings firebase Download file google-service.json

4.Add file google-service.json in project and rebuild.

椒妓 2025-01-24 02:00:44

对我来说,问题是我注册了应用程序并在 Firebase 控制台上启用了 google 登录,但我正在使用应用程序的调试版本进行测试,该版本的包名称略有不同(名称相同但以 .debug 结尾),因此它无法工作,因为调试应用程序尚未注册。因此,除了我的发布应用程序之外,我还将调试应用程序添加到该应用程序的 firebase 项目中,它生成了自己的 google-services.json,我将其下载并设置为 src/debug/google-services.json。

我相信这对其他人可能有用。

For me the problem was that i registered app and enabled google signin on Firebase console but I was testing with the debug version of app which has slightly different package name (same name but ended with .debug) so it was not working because the debug app is not yet registered. so additionally to my release app i also added the debug app to the firebase project for the app and it generated it's own google-services.json which i download and set to src/debug/google-services.json.

I believe this might be useful to some one else.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文