Modifications to nodeBB for BRF Energi

Usage no npm install needed!

<script type="module">
  import nodebbPluginBrfEnergi from '';


BRF Energi plugin

Specialized plugin for BRF Energi forum, supposed to make everything run right the way we want it.

API extensions


Not really API, but shows admin interface and some options. Probably pretty ugly and full of test options


Redirects to /auth/metry if you're not logged in yet, otherwise just goes to homepage (For /auth/metry, see sso-metry plugin).


Performs BRF authentication, and if successful returns the userid

POST /api/brftouch (Mirror a brfapp user, create if needed)

Wants an already-authenticated BRF token, and if it checks out it either authenticates the corresponding user or creates a new one in case it doesn't exist on the forum yet. Used for the linking between forum and main website.

POST /api/brfauth/uid (Get user's uid and matryid)

Authenticates by username/email and password like normal, returns uid and metryid if exists. You can use an email as the username, it willbe resolved. In case of incorrect password, you'll get something like this:

    "path": "&#x2F;forum&#x2F;api&#x2F;brfauth&#x2F;uid",
    "error": "[[error:invalid-login-credentials]]"

POST (Register a new user)

Register a new user thru nodebb. This is a nodebb-official endpoint, but I include some docs on it here because it's useful, while risking that it becomes outdated.



(Token) :=


  "username": "JohnDoe",

  "email": "",

  "password": "djd982j3dj8ffa2ca02",

  "_uid": "1" // Admin, dont change.


Token shall be signed with the key that is set in the plugin settings.


Good response:


Bad responses:


{"code":"params-missing","message":"Required parameters were missing from this API call, please see the \"params\" property","params":["_uid"]}

(Rest is NodeBB defualt stuff) brf-energi Plugin for NodeBB

A starter kit for quickly creating NodeBB plugins. Comes with a pre-setup LESS file, server side JS script with an action:app.load hook, and a client-side script. Most plugins need at least one of the above, so this ought to save you some time. For a full list of hooks have a look at our wiki page, and for more information about creating plugins please visit our documentation portal.

Fork this or copy it, and using your favourite text editor find and replace all instances of nodebb-plugin-brf-energi with nodebb-plugin-your-plugins-name. Change the author's name in the LICENSE and package.json files.

Once you're done don't forget to publish it on NPM, and make a thread about it here.

Hello World

Really simple, just edit static/lib/main.js and paste in console.log('hello world');, and that's it!


npm install nodebb-plugin-brf-energi


Don't forget to add screenshots!