如何使用 firebase admin sdk 列出所有用户 [英] How can I list all users using firebase admin sdk

查看:21
本文介绍了如何使用 firebase admin sdk 列出所有用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法列出所有使用 firebase admin sdk 的用户?文档仅显示通过 uid 或电子邮件获取一个用户.

Is there a way to list all the users using the firebase admin sdk? Documentation only shows getting one user either by uid or email.

推荐答案

最新的 firebase-admin sdk(截至目前版本 5.4.2)有 listUsers API 可以做到这一点.示例在此处.

The latest firebase-admin sdk (as of now version 5.4.2) has listUsers API that would do that. The example is here.

要添加到示例中的一件事是,必须省略 nextPageToken 或一个有效的用户 ID.(IMO,在示例或 API 文档中都不明显.)

One thing to add to the example, the nextPageToken has to be omitted or a valid userid. (IMO, it's not obvious in neither the example or the API doc.)

这篇关于如何使用 firebase admin sdk 列出所有用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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