仅在 Android 上 Google Auth 出现问题
我的 firebase 身份验证过去在 iOS 和 Android 上的 IONIC 应用程序上都能顺利运行。
在 iOS 端进行了相当多的更改后,在 Android 上进行了测试,我无法再进行谷歌登录,尽管它在 iOS 上仍然运行良好,但在 Android 上却给了我这个。
我已经在 firebase 控制台中检查了我的 SHA1 和 SHA256 配置。 使用 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.
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 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 登录恢复工作
使用上面的命令,返回我的版本 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
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