Implementing user account management by fetching users
The Admin SDK is present to provide one of the advanced features of Firebase within the same scope and perspective of better handling and better experience. Managing user accounts will include functionalities such as creating/deleting users, fetching users by email ID or phone number, updating users account properties, and accessing metadata.
In this recipe, we'll see how we can fetch users using nothing but the Firebase Admin NodeJS library. So, let's get busy!
How to do it...
Fetching users is the most common feature that any platform would want to feature, so let's see how we can fetch users from their email and phone number.
We will first learn about fetching users by email:
- Open up your project that we've created and configured already. Let's add the following line to see how we can fetch users by email.
- Let's suppose we've got a search input and a button; this will finally send a post request to our NodeJS backend, so we can now access...