如何使用Firebase Admin SDK列出所有用户 [英] How can I list all users using firebase admin sdk
本文介绍了如何使用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屋!
查看全文