I'm using Firebase and need to add a removeUser() function to remove a user account however there is also data stored under that uid in the database. Is it possible for the removeUser() function to also remove that data or is the only way to run another Firebase function (remove()) as a callback?
Thanks, J
Firebase doesn't store any data about your users in your database. So if there is data about the user in your Firebase database, it is because your application stored it there. Likely you store it there when you called
createUser()
, as recommended in the Firebase programming guide for storing user data.For this reason it makes sense that it's also the responsibility of your application to remove the data about a user when it calls
removeUser()
. This can be as simple as:Look at the docs for
removeUser()
to see how it handles errors/