0

Im currently building a management app and im having a bit of a issue,Im unable to delete user accounts other then my own on the app in flutter

I need to find a way to remove firestore auth accounts from my app when the signed in user is a "Admin" or "Super admin" and i just cant seem to find a way anywhere online. as a management app its very important that i have the feature

I need to delete other accounts on my app when a user is admin when i press remove user on the app. thou it seems you can only delete the current signed in user which is understandable but im sure there must be a way

so basically

not

currentUser().Delete()

but

otherUser(email).Delete()
James Z
  • 12,209
  • 10
  • 24
  • 44
Simeon
  • 1

1 Answers1

1

This is not possible using the client SDK. For this, you need to use de Admin SDK I'd suggest you to create a cloud function which has this integration and call it from your app. You're not going to be able to perform this action from the frontend since you need an Firebase Auth Admin SDK which is not available in other technologies but in backend ones (Node, Go, etc).

Luis Utrera
  • 942
  • 6
  • 15