Is there any way to get Firebase Auth User UID?

后端 未结 5 1042
小蘑菇
小蘑菇 2020-12-08 14:34

I am looking to fetch Auth User(s) UID from Firebase via NodeJS or Javascript API. I have attached screenshot for it so that you will have idea what I am looking for.

<
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 15:16

    As of now in Firebase console, there is no direct API to get a list of users, Auth User(s) UID.
    But inside your Firebase database, you can maintain the User UID at user level. As below,

    "users": {
      "user-1": {
        "uid": "abcd..",
        ....
      },
      "user-2": {
        "uid": "abcd..",
        ....
      },
      "user-3": {
        "uid": "abcd..",
        ....
      }
    }
    

    Then you can make a query and retrieve it whenever you need uid's.
    Hope this simple solution could help you!

提交回复
热议问题