How to setup an account as the default service account for Firebase?

ぐ巨炮叔叔 提交于 2020-06-26 12:59:39

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/57474965/how-to-setup-an-account-as-the-default-service-account-for-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!