Is there any way to get Firebase Auth User UID?

后端 未结 5 1048
小蘑菇
小蘑菇 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条回答
  •  Happy的楠姐
    2020-12-08 15:03

    From Firebase docs, use Firebase.getAuth():

    var ref = new Firebase("https://.firebaseio.com");
    var authData = ref.getAuth();
    
    if (authData) {
      console.log("Authenticated user with uid:", authData.uid);
    }
    

    Source:

    • Firebase.getAuth()

提交回复
热议问题