Config Node - GogoVega/node-red-contrib-firebase-realtime-database GitHub Wiki

[!WARNING] For versions >= 0.6, the Config Node has been externalized to the Firebase Config Node repository.

What is config-node?

The configuration node (config-node) is a node common to the nodes (visible on the palette), when you add a config-node, it creates a local database and establishes a connection with the remote database . Its role allows to associate several nodes to a single connection with the remote database. The creation of a local database, allows your nodes to operate normally in case of lost connection with the remote database. Read more here.

How to create a config-node?

Add a node (from palette), no matter which one, then click on it to open it. For the Database field, select the add new database-config option then click on the pencil icon. Tada, you have just created a config-node, now you just have to complete it and click on Add.

How to configure a config-node?

The config-node is divided into two parts, selecting the authentication method and filling in the credentials.

Below you will find the detail of what to fill in for each authentication method:

Anonymous

Fill in the API Key and the URL of your database.

Email and Password

Fill in the API Key and the URL of your database and also the email address and password of your user. If you haven't created a user, don't panic, just check the Add new user box. More infos here.

Private Key

Fill in the URL of your database and either complete the fields with the content of the JSON file downloaded previously (see here) or click or drag your file on the gray area, the magic will complete your fields. If you haven't yet generated a Private Key, the steps are available here.

[!NOTE] This method makes you an administrator, which means that the security rules do not apply to you.

Custom Token

Fill in the API Key and the URL of your database and also the Client Email and Private Key fields as explained above. The UID field should uniquely identify the user or device you are authenticating. The Claims option are additional claims to include in the Custom Token, which will be available in the auth / request.auth objects of your security rules.

How to delete a config-node?

When you delete a node, you do not delete the config-node, to delete it, go to the Configuration nodes tab then click on it and finally click on Delete:

[!NOTE] A warning message will be sent in the debug if a config-node is unused.

Destroy Connection

If a config-node is unused, a warning message will be sent in the debug and the connection with the remote database will be destroyed. Do not panic if this node is reused, the connection will be re-established.

Next Step