火力地堡凭证错误

问题描述:

我得到了一些错误:火力地堡凭证错误

Credential implementation provided to initializeApp() via the \"credential\" property failed to fetch a valid Google OAuth2 access token with the following error: \"Error fetching access token: invalid_grant (Invalid JWT: Token must be a short-lived token and in a reasonable timeframe)\".

有两个可能的原因: (1)你的服务器时间未正确同步或 (2)证书密钥文件已被吊销。

解决(1),重新同步服务器上的时间。 要解决(2),请确保密钥文件的密钥ID仍存在于firebase project。如果没有,请在service account setting处生成一个新的密钥文件。

当我尝试在Nodejs中使用Firebase Admin SDK时。

在我的本地计算机上工作,但是当我尝试在AWS服务器中使用时,出现此错误。一些小费?

这通常是因为您的服务器时钟不同步。您将需要调整和同步AWS VM实例上的时钟。见Token must be a short-lived token and in a reasonable timeframe