如何将帐户设置为Firebase的默认服务帐户? [英] How to setup an account as the default service account for Firebase?

查看:67
本文介绍了如何将帐户设置为Firebase的默认服务帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不小心删除了Firebase的默认服务帐户,现在我的功能无法访问Firestore,并返回以下错误.

 {"code": "400","details": "Getting metadata from plugin failed with error: invalid_grant: Not a valid email or user ID.","metadata": {"internalRepr": {}}}

我再次使用相关权限为firebase创建了服务帐户,但不确定如何将其设置为默认帐户.

任何帮助将不胜感激.如果问题中缺少一些细节,我将很乐意补充.谢谢

解决方案

针对正在努力解决此问题并已最近删除默认服务帐户(在30天内)的人可以转到此链接以获取解决方案:​​当使用默认服务帐户时在30天内被删除.

如果30天的窗口已经过去,并且您正在寻找其他解决方案,例如创建新的服务帐户并将其设置为默认帐户,请让我告诉您,

不可能.唯一的解决方法是创建一个新项目并在此处部署所需的服务." .

这不是我在说,这是预期的行为.我在这个问题上苦苦挣扎,没有在网上找到任何解决方案,也没有在堆栈溢出问题上找到任何解决方案,在他们的文档中也找不到.

最后, Maxim 上的组件.

所以我确实通过Google Issuetracker公开了一个私人问题,这是他们的回应:

希望这可以节省某人的时间.我为这个问题苦苦挣扎了2天.得出结论很浪费时间.

I have accidentally deleted my default service accounts for firebase and now my functions are unable to access firestore and are returned with the following error.

 {"code": "400","details": "Getting metadata from plugin failed with error: invalid_grant: Not a valid email or user ID.","metadata": {"internalRepr": {}}}

I have created a service account for firebase again with the relevant permissions, but not sure how to set it up as the default account.

Any help would be appreciated. If there is some details missing in the question, I will be happy to add. Thanks

解决方案

For guys struggling with this issue and have recently deleted the default service account (within 30 days) can go to this link for solution: When default service account is deleted within 30 days.

If the 30 days window has passed and you're looking for other solutions like creating a new service account and setting it to default, let me tell you,

"THAT'S NOT POSSIBLE. The only workaround available is create a new project and deploy the service desired there.".

It's not me who's saying this, that is the expected behaviour. I struggled a lot with this issue, and did not find any solutions online or on any stackoverflow question and neither in their documentation.

Finally there was a answer by Maxim on this link where I had three alternate ways, one of which was to:

  • open a private issue by providing your project number in the following component.

So I did open a private issue with Google Issuetracker and this was the response from them:

Hope this saves someone's time. I struggled with this issue for 2 days. Such a waste of time to come to this conclusion.

这篇关于如何将帐户设置为Firebase的默认服务帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆