I want to add the option to remove A user from firebase authenticated Users list - from my web application. The authentication method I used is email and password authentication.
the application is mobile single page application, based on js/html/css files (browser application).
- can I use firebase Admin SDK to delete A user?
- is there A better way of doing it? what is the best practice?
Thanks Michael.
I want to add the option to remove A user from firebase authenticated Users list - from my web application. The authentication method I used is email and password authentication.
the application is mobile single page application, based on js/html/css files (browser application).
- can I use firebase Admin SDK to delete A user?
- is there A better way of doing it? what is the best practice?
Thanks Michael.
Share Improve this question asked Jun 23, 2017 at 12:49 Michael GabbayMichael Gabbay 4651 gold badge5 silver badges24 bronze badges1 Answer
Reset to default 4The Firebase Admin SDK can be used to delete a user.
But it should only be used in trusted environments, since it allows full access to most of the Firebase services in your project. Typical trusted environments are: a server you control, or Cloud Functions for Firebase.
So a mon way to do this is to build a Cloud Function that deletes the user (using the Admin SDK) and then call that function from your web app. You will have to ensure that only trusted users can call the functionality then, typically by checking their UID or email address against a known list of trusted users.