I want to delete a FirebaseUser by their uid value in Flutter. I have found this post that shows how to delete the User, but I can't seem to find a way to retrieve a FirebaseUser by their id. I know once I can get the user I can do the following fireBaseUser.delete() using this method. Thanks for any help!

Solution 1: Doug Stevenson

There is no Firebase client API on any platform for getting a user by ID. That operation is reserved for the Firebase Admin SDK only. What you will have to do is either one of these two options:

  • Store the user data you want to get in a database somewhere that's accessible to the client
  • Create a backend endpoint that your client can call to get the user data via the Admin SDK