0

I need to get a specific user data in firebase auth using javascript by a UID (User id). If it's not allowed to get a user by id, at least is there a way to get all users, then i could loop through these users and check if the id of the user equals to that id. Is that possible?

firebase auth users

Ali Guliyev
  • 41
  • 1
  • 7
  • It's not possible with web and mobile client SDKs. That's a security problem. You can only do it on your backend with the Firebase Admin SDK. – Doug Stevenson Aug 25 '21 at 15:35

1 Answers1

0

Add another collection named users where you store your desired data in and keep the documents id's in sync with the auth uids.

PRSHL
  • 626
  • 1
  • 7
  • 19
  • I tried that but, for example if i change the displayName of a user in Authentication that will not be changed in Firebase Firestore Collection. How do i handle THAT? – Ali Guliyev Aug 25 '21 at 15:16