简体   繁体   English

尝试在 Android Studio 中使用 Google Firebase 身份验证

[英]Trying to use Google Firebase Authentication with Android Studio

We're using Firebases authentication for logging in and registering accounts.我们使用 Firebases 身份验证来登录和注册帐户。 For some reason, one person on the team (member 1) is able to use it properly but when myself or another team member (member 3) tries to test it by creating an account or logging in we get the error出于某种原因,团队中的一个人(成员 1)能够正确使用它,但是当我自己或另一个团队成员(成员 3)尝试通过创建帐户或登录来测试它时,我们会收到错误消息

com.google.firebase.auth.FirebaseAuthException: The given sign-in provider is disabled for this Firebase project. com.google.firebase.auth.FirebaseAuthException:此 Firebase 项目禁用了给定的登录提供程序。 Enable it in the Firebase console, under the sign-in method tab of the Auth section.在 Firebase 控制台中,在身份验证部分的登录方法选项卡下启用它。

We have tried everything we can think of to fix this error.我们已经尝试了我们能想到的一切来修复这个错误。 Email/password sign-in is enabled in the firebase project. firebase 项目中启用了电子邮件/密码登录。 We've tried completely copying the files on his machine to ours and it still won't work.我们已经尝试将他机器上的文件完全复制到我们的机器上,但仍然无法正常工作。 What's even odder is that it works fine on member 3's laptop, but not his desktop.更奇怪的是,它可以在成员 3 的笔记本电脑上正常工作,但在他的台式机上却无法正常工作。 I've also had member 1 send me a build from his machine onto my phone and it will work then.我还让成员 1 从他的机器向我发送了一个构建到我的手机上,然后它就可以工作了。 I tried completely reinstalling Android Studio as well.我也尝试完全重新安装 Android Studio。 I'm not even sure what files to show because I can't imagine it's a problem with the code, since it works perfectly fine for member 1 and member 3 on his laptop.我什至不确定要显示哪些文件,因为我无法想象这是代码的问题,因为它对他的笔记本电脑上的成员 1 和成员 3 工作得非常好。 If there's any file you need to see I'll be glad to add it.如果您需要查看任何文件,我会很乐意添加它。

That might actually be working in the third members laptop because he would have linked the firebase with your project and put the SHA-1 of his laptop, If you want that to work with yours as well then you need to go to firebase console and add SHA-1 to the console to have it work.这实际上可能在第三个成员的笔记本电脑上工作,因为他会将 firebase 与您的项目联系起来,并放置他笔记本电脑的 SHA-1,如果您希望它也与您的笔记本电脑一起使用,那么您需要转到 firebase 控制台并添加SHA-1 到控制台以使其工作。 try this .试试这个

And if it helps please do accept i, if I didnt help let me know and il check more for you.如果有帮助,请接受我,如果我没有帮助,请告诉我,我会为您检查更多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM