I am new to node.js. I have a created a database with users node. Users node is protected with the following rules.
{
\"rules\": {
\"users\":{
This is described in the documentation:
On your server, when you initialize the Firebase app, use the databaseAuthVariableOverride option to override the auth object used by your database rules. In this custom auth object, set the uid field to the identifier you used to represent your service in your Security Rules.
// Initialize the app with a custom auth variable, limiting the server's access admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://databaseName.firebaseio.com", databaseAuthVariableOverride: { uid: "my-service-worker" } });