仅在 Android 上 Google Auth 出现问题

发布于 2025-01-14 09:49:40 字数 464 浏览 6 评论 0原文

我的 firebase 身份验证过去在 iOS 和 Android 上的 IONIC 应用程序上都能顺利运行。

在 iOS 端进行了相当多的更改后,在 Android 上进行了测试,我无法再进行谷歌登录,尽管它在 iOS 上仍然运行良好,但在 Android 上却给了我这个。

输入图片此处描述

我已经在 firebase 控制台中检查了我的 SHA1SHA256 配置。 使用 google 登录也可以在网络浏览器上使用。仅在 Android 上失败。

欢迎任何建议。

My firebase authentication used to work smoothly on my IONIC app on both iOS and Android.

Testing on Android after quite a few changes working on IOS side, I can no longer make a google login, though it still works well on iOS it gives me this on Android.

enter image description here

I already checked my SHA1 and SHA256 configuration in firebase console.
Loging in with google also works on a web browser. It only fails on Android.

Any suggestion is welcome.

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

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

发布评论

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

评论(1

情话已封尘 2025-01-21 09:49:40

我在 Android 版本的离子电容器中遇到了同样的问题...

检查您的 SKD 是否自动更新...

我不知道为什么它改变了我的 SHA-1 运行命令来获取 SHA-1 并与atual 在你的 firebase 中(我的不同)

-> keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

进入您的 firebase 控制台 (console.firebase.google.com) 包含新的 SHA-1 并下载新的 google-service.json ,更改项目中的文件并重试 - 对我来说工作正常

IOS 应用程序工作正常,因为 firebase 不需要 sha-1,但只需要包 ID

我检查过再次发现我为我的项目创建了一个新密钥,这更改了 SHA-1,因此我将 SHA-1 包含在 firebase 中,用于调试和发布,此后,google 登录恢复工作

keytool -list -v -keystore C:\Users\biel7\.android\Release.jks -alias Release

使用上面的命令,返回我的版本 SHA-1,因为在我的情况下,当我尝试创建版本 APK 时,谷歌登录停止工作

I had the same problem in the Ionic Capacitor for android version...

Check if your SKD was automatically updated...

I don't know why it changed my SHA-1 run the command to get the SHA-1 and compare with the atual in your firebase (mine was different)

-> keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

go inside your firebase console (console.firebase.google.com) include the new SHA-1 and download your new google-service.json, change the file in your project and try again - for me works fine

The IOS application works fine due to the firebase didnt need the sha-1, but only the package ID

I Checked again and found that I created a new key for my project, this changed the SHA-1, so I included the SHA-1 in firebase, both for debug and release, after this, google login returned to work

keytool -list -v -keystore C:\Users\biel7\.android\Release.jks -alias Release

using the command above, returns my release SHA-1, because in my case when i tried to create the release APK the google login stopped works

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