我已阅读 https://firebase.google.com/docs/auth/limits 中有关 Firebase 身份验证限制的文档。它指出每个项目每秒的请求数限制为 1000 个。没有关于这些 API 限制的示例或任何解释。哪些类型的操作计入 API 限制? Admin SDK 中的 verifyIdToken()
和 createUser()
是否算作 API 请求?
我还知道有一个重复的问题 here但还没有得到很好的回答。
最佳答案
我已向 Firebase 支持人员询问 API 限制并得到以下答复:
The API’s quota applies depending on the Firebase API you want to use. In this case the API quota applies to the use of the Firebase Auth REST API. Using it, you can query the Firebase Auth backend through a REST API. Also, it can be used for various operations such as creating new users, signing in existing ones and editing or deleting these users.
To create, and refresh a token the quota will apply, if you use the REST API to do the operations. However, even if you don’t use the REST API there are other internal quotas associated with the refreshing of the token. In order to avoid refreshing the token so many times, set forceRefresh to false to minimize unneeded token refreshes when a valid token may still be cached.
我还询问过使用官方 sdk 刷新 token 时的内部配额,并得到了以下答复:
Unfortunately, some quotas are internal, and confidential information. For this reason, I am not able to share it with you. However, if you receive quota errors you can contact us
速率限制包括客户端和管理 SDK:
The API limits encapsulates every request that comes from the API. This includes various operations such as creating new users, signing in existing ones, and editing or deleting users. The limits apply to requests coming from both the Client and Admin SDK. This means that Firebase allows you to have 1000 simultaneous requests/second (both from Client and Admin SDK) in a project. ~ Firebase Support
关于firebase - Firebase Auth 中哪些被视为 API 限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65272165/