Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between the firebase and the firebase-admin npm module?

I want to build a Node.js web app using Firebase (authentication, database and storage). But I get confused on which module should I use, firebase or firebase-admin (or both).

like image 314
Diogo Capela Avatar asked Mar 22 '17 17:03

Diogo Capela


People also ask

What is the difference between Firebase and Firebase admin?

The admin SDK runs your code with administrative permissions. This means it bypasses the security rules of your Firebase Database. It also has functionality to manage users and mint custom tokens and can be used to send FCM messages.

What is firebase admin?

The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments to perform actions like: Read and write Realtime Database data with full admin privileges.

What is firebase admin in node JS?

Firebase Admin Node. Firebase provides the tools and infrastructure you need to develop your app, grow your user base, and earn money. The Firebase Admin Node. js SDK enables access to Firebase services from privileged environments (such as servers or cloud) in Node. js.


1 Answers

The admin SDK runs your code with administrative permissions. This means it bypasses the security rules of your Firebase Database. It also has functionality to manage users and mint custom tokens and can be used to send FCM messages.

If you use the regular (non-admin) Firebase module, you're running as a regular Firebase client and don't have these expanded capabilities.

like image 172
Frank van Puffelen Avatar answered Sep 28 '22 02:09

Frank van Puffelen