Disable many users at once

江枫思渺然 提交于 2019-12-22 08:46:10

问题


We are using Firebase Authentication in a multitenant setup. Under certain circumstances, we want to disable all users for one tenant (trial ended, subscription not renewed ...) or enable all previously disabled users. We send an UpdateRequest for every user that has to be enabled/disabled.

Although we send the requests sequentially (only one at a time per tenant and not many tenants are disabled at the same time), we have encountered a quota exceeded error several times:

{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "invalid",
                "message": "QUOTA_EXCEEDED : Exceeded quota for updating account information."
            }
        ],
        "code": 400,
        "message": "QUOTA_EXCEEDED : Exceeded quota for updating account information."
    }
}

Is there a way to do a batch update for multiple users using the Admin SDK? We are currently using it from Java, but NodeJS would also work for us. Alternatively, it would be interesting to know, if there is another way to disable multiple users, e.g. with an expression filter on user properties.


回答1:


There are no bulk operations for updating users with the Firebase Admin SDK. Please feel free to file a feature request describing your use case for that.



来源:https://stackoverflow.com/questions/50763528/disable-many-users-at-once

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