Q:

How can I find a phone number from authenticated users in Firebase?

I am making an android chat application and I am trying to fetch those contacts who have created their account. If any contact of a user has not created the account, that contact should not be in the list. I cannot find a proper way to query my authenticated users and comparing them with the user's contact. How can I achieve this?

A:

Firebase Authentication doesn't provide any methods for clients to query the list of users who have authenticated.  The Firebase Admin SDK (usable only in server code) can only list all users or fetch a particular user by UID.
If the Admin SDK isn't sufficient, it's your responsibility to store the information you'd like to query in a database that satisfies your needs.  Many developers choose to use Realtime Database or Cloud Firestore for this, but you can use whatever you want.

