0

In the Firebase documentation > Build > Authentication > Admin > Manage Users. They start showing us ho to manage the users without talking about how to Add the Firebase Admin SDK first, and even when I followed the setup instructions I couldn't do it right.

I tried to Add the Firebase Admin SDK to my React project, but I got this error: (Uncaught Error: Cannot find module 'fs') How can I Add the Firebase Admin SDK and start managing the users?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Karos
  • 1

1 Answers1

1

How can I Add the Firebase Admin SDK and start managing the users?

The short answer is that you can't.

The Firebase Admin SDK is for backend code, not frontend. You can even see in the Firebase Admin set documentation (emaphasis mine):

Add the Firebase Admin SDK to your server

The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments

It's a security problem to have the Admin SDK and admin credentials in your frontend for everyone to see. If you want to manage users with Firebase Admin, you will need a backend, and invoke that from your frontend as needed.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441