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?
Asked
Active
Viewed 151 times
0
-
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 Answers
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