Gathering detailed insights and metrics for node-red-contrib-firebase-admin
Gathering detailed insights and metrics for node-red-contrib-firebase-admin
Gathering detailed insights and metrics for node-red-contrib-firebase-admin
Gathering detailed insights and metrics for node-red-contrib-firebase-admin
@gogovega/node-red-contrib-firebase-realtime-database
Node-RED nodes to communicate with Google Firebase Realtime Databases
node-red-contrib-firebase-admin-config
Configuration node for node-red-contrib-firebase-(messaging/realtime-database).
node-red-contrib-cloud-firebase-admin
Node-RED nodes to configure a Firebase admin access
@gogovega/node-red-contrib-cloud-firestore
Node-RED nodes to communicate with Google Cloud Firestore
A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.
npm install node-red-contrib-firebase-admin
Typescript
Module System
Node Version
NPM Version
HTML (52.04%)
JavaScript (47.96%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Stars
105 Commits
10 Forks
4 Watchers
4 Branches
5 Contributors
Updated on Mar 16, 2023
Latest Version
1.1.35
Package Id
node-red-contrib-firebase-admin@1.1.35
Unpacked Size
91.59 kB
Size
40.53 kB
File Count
40
NPM Version
6.14.6
Node Version
12.18.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
A node-red module that wraps the server-side admin SDK of firebase, firestore, cloud storage, etc.
NOTE This library uses similar names to other firebase modules. Check to ensure there is no overlap between config nodes, which may cause unpredictable results.
The main difference of this module and all other firebase/store modules for node-red is that it takes a service account credential token as configuration.
This means that the nodes can run outside of the normal security rules, in admin mode, which is useful when running on the back-end.
Firebase Service Account Credentials This is a json of the service account credentials private key file. This can be found in Firebase console by clicking the cogwheel icon in the top left, going to "Project Settings" and to the "Service Accounts" tab. Click "Generate new private key", which should trigger a download. Open the file in an IDE and copy the text to the node configuration. It will like { "type": "service_account", "project_id": ... ... } Firebase Database URL The database URL for the database can be found in the respective databases in the console. The url has has a format like "https://myprojectname.firebaseio.com".
Get data from a path in the rtdb database
Input: msg.payload with json {"path": "foo/bar"} Output: msg.payload is data at the path "foo/bar".
Set up a snapshot listener for a path in the rtdb database
Input: msg.payload with json {"path": "foo/bar"} Output: Injects msg.payload with value of data was at path "foo/bar" on change
Set data at a path in the rtdb database. Uses onSnapshot and will fire every time the data at the path changes and so drive flow execution from that point.
Input: msg.payload with json {"path": "foo/bar", "obj": {"the": "object"}}
Pushes the new object onto an array under the path
Input: msg.payload with json {"path": "foo/bar", "obj": {"object": "toy","color":"blue"}}
Set up a reactive query for a path in the rtdb database.
Input: msg.payload with json {"path": "foo/bar", queries:[], on: "value"}} For queries, the array should contain a json object with the query parameters. Some examples:
Optionally, on: "value" can be replaced with "child_added", "child_removed", "child_changed", "child_moved". If empty, "value" is default.
Output: msg.payload is an array[] of query results .
Get data from a path in the rtdb database
Input: msg.payload with json {"path": "foo/bar"} Output: msg.payload is data at the path "foo/bar".
Set up a snapshot listener for a path in the rtdb database
Input: msg.payload with json {"path": "foo/bar"} Output: Injects msg.payload with value of data was at path "foo/bar" on change
Set data at a path in the firestore database. Uses "onSnapshot" and will fire every time the data at the path changes and so drive flow execution from that point.
{"path": "foo/bar", "obj": {"some": object, "foo": 17}}
Adds the new object under the collection the path describes and assigns it a random id
Input: msg.payload is json object with "path" and "obj" keys {"path": "foo/bar", "obj": {"some": object, "foo": 17}}
Output: msg.payload becomes the ID of the new document
Set up a reactive query for a collection in the firestore database.
Input: msg.payload is json object with "path", "limit, "startAt", "endAt", "orderBy", "orderDirection", and "queries" keys. Notes: startAt and endAt follow the orderBy property. orderDirection defaults to "desc". Ex { "path": "foo/bar", "limit": 7, "startAt": 4000, // follows the orderBy property "endAt": 4050, // follows the orderBy property "orderBy": "shoeSize", "orderDirection": "asc", //default is "desc" "queries":[ ["company", ["=="] "ACME"], ["createdAt", ">", 1560099394242] ] }
Output: msg.payload is an array of query results.
Read file data from a file at a given path under a given cloud storage bucket.
Input: msg.payload is json object with optional "bucket" and optional "path", which override the default values set in the general firebase SDK settings.
{
"bucket": "xyzzyz123.appspot.com",
"path": "myFile.txt"
}
Output: Buffer object containing the binary file contents. Can easily be converted to a string by calling toString() on the Buffer.
Writes the content of JavaScript Buffer object to a file path in a storage bucket.
Input: msg.payload is json object with optional "bucket" and "path"
{
"bucket": "abc.appspot.com", // optional, is otherwise set as node config
"path": "foo/bar/baz.json", // optional, see above
"contents": <Buffer obj>,
"contentType": "application/json" }, // optional
"metadata": { "very":"interesting"}, // optional
"public": true, // optional
"private": false // optional
}
Output: msg.payload is json object with "success" status and new "filename" string
Lists the contents of files in a bucket
If "path" is defined in the json payload, only files beginning with that path will be returned. If omitted, the root level of the bucket is returned in the payload. A path can also be deep likes this; "foo/bar/baz". "delimiter" is the charatcer used to delimit directory levels, "/" by default.
Input: msg.payload is json object with optional parameters
{
"bucket": "xyzzyz123.appspot.com", // optional
"path": "directory1", // optional
"delimiter": "/" // optional
}
Output: An array of google cloud-storage File objects. If you take this output and send it to a function which outputs a payload like this;
{"files": array_of_File_obejcts}
The storage-read module will read all file contents and output an object of filename keyed Buffer objects instead of the normal one.
Deletes a file at a given path under a given cloud storage bucket. The default bucket to be used can be set in the general firebase SDK settings. If the payload defines an optional bucket property, it will override the default bucket settings.
Input: msg.payload is json object with optional parameters
{
"bucket": "xyzzyz123.appspot.com",
"path": "myFile.txt"
}
Output: An array of headers returned by the operation if all went well.
Dcoumentation and problem-solving hints can be found here; (https://firebase.google.com/docs/auth/admin/verify-id-tokens). Note that you need to explicitly get the correct id token in the client and send it to the back-end.
Decrypts a firebase client SDK JWT idToken into a user object.
Input: msg.payload is json object with optional parameters
{
idtoken: "eyJhbGciOiJSUz....fMrAUdK"
}
Output: msg.payload returned is an array of user details.
{
"name": "Foo Foobarson", "picture": "https://...", ..
}
#Use In Functions After initializing, the reference to the firebase SDK is stored in the global context variable 'firebase', which can be used in any function like this;
let fb = global.get('firebase')
fb.firestore().doc('foo/bar').get().then((ref)=>{
let d = ref.data()
node.send( {payload: {data: d}});
})
The cloud-storage reference is also made available under the global context variable 'cloud-storage'.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/9 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
security policy file not detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
30 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More