Ad

Firebase Kicks Out Current User - "Managing Users" With The Web SDK

I have a (not so small) project started with ReactJS and Firebase web SDK - and I would like to somehow manage (at least add & delete) users in my system.

  1. I am totally aware, that there is an Admin SDK, but I wouldn't like to transition to that in the current phase of the development. I would like to go on with the web SDK.

  2. I have seen this nice workaround regarding the user-addition - and I managed to create & insert users with that.

Now, I need a way to delete or suspend users (at least), if possible. (I don't need strictly to have the update option, I can live without that.)

Do you now any way / workaround to that - similar to the point 2. ? Any idea how to achieve that?

Ad

Answer

The mobile and web clients for Firebase Authentication are not capable of changing the status of an arbitrary user account. A user account only has permission to delete itself, not other accounts.

You will need to use the Admin SDK for that, from a backend or desktop system you control. Initialized with a service account, it will have privileged access to manage user accounts.

Ad
source: stackoverflow.com
Ad