一次停用多个用户 [英] Disable many users at once

查看:84
本文介绍了一次停用多个用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在多租户设置中使用 Firebase身份验证.在某些情况下,我们希望禁用一个租户的所有用户(试用期结束,未续订订阅...)或启用所有以前禁用的用户.我们为必须启用的每个用户发送 UpdateRequest /已禁用.

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."
    }
}

是否可以使用Admin SDK对多个用户进行批量更新?我们目前正在Java中使用它,但是NodeJS也可以为我们工作.可替代地,知道是否存在另一种禁用多个用户的方法将是有趣的.带有针对用户属性的表达式过滤器.

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.

推荐答案

没有使用Firebase Admin SDK更新用户的批量操作.请随时提交功能请求,以描述您的用例.

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.

这篇关于一次停用多个用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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