Retrieving a List of Users Who Have Registered Using Firebase Auth

Retrieve list of user from Firebase Authentication

It's not possible to retrieve a list of users from Firebase Authentication.

The explanation is in this thread

The only way to do that is to save the user to the database once they are registered.

How to programmatically get the list of registered users in Firebase

You can't

The explanation is here How do I return a list of users if I use the Firebase simple username & password authentication

You can instead set the user's uid to users node in your database, I use that node to store other user's information. then you can get the number of childs under that node.

firebase - check if an user is already registered in database

It sounds like you're looking for the fetchSignInMethodsForEmail method, which returns the list of providers with which a specified email address has previously been signed in to Firebase.

The typical flow is:

  • Get the email address of the user
  • Call fetchSignInMethodsForEmail to get a list of providers
  • If the list is empty, go to your account creation flow
  • If the list has a single value, show the sign in screen for that provider
  • If the list has multiple values, show a screen where the user can pick from those providers


Related Topics



Leave a reply



Submit