@cappern/node-red-dashboard-2-oauth2-auth 0.1.4

OAuth2-Proxy based authentication plugin for node-red-dashboard-2

npm install @cappern/node-red-dashboard-2-oauth2-auth

@cappern/node-red-dashboard-2-oauth2-auth

Node-RED License: AGPL v3

A Node-RED Dashboard 2 plugin that integrates with oauth2-proxy.
It extracts user information from the HTTP headers added by oauth2-proxy and makes them available inside Dashboard flows via msg._client.user.


🚀 Features

  • Automatically attaches user info to msg._client.user
  • Supports common oauth2-proxy headers:
    • x-auth-request-user, x-forwarded-user
    • x-auth-request-email, x-forwarded-email
    • x-auth-request-preferred-username
  • Adds socketId and socketIp to help trace individual client sessions
  • Prevents unauthenticated users from interacting with flows (configurable in hook onIsValidConnection)

📦 Installation

From your Node-RED user directory (e.g. ~/.node-red or /data inside Docker):

npm install @cappern/node-red-dashboard-2-oauth2-auth

Restart Node-RED after installation.


🔧 Usage

  1. Run Node-RED Dashboard 2 behind oauth2-proxy
    (for example with Traefik, Nginx, or another reverse proxy).
  2. Ensure oauth2-proxy is configured to forward user headers (e.g. --set-xauthrequest).
  3. Open Dashboard → Sidebar → Client Data.
    You should see OAuth2 Proxy listed as a client data provider.
  4. In your flows, you can now access user info:
{
  "_client": {
    "user": {
      "userId": "jdoe",
      "email": "[email protected]",
      "username": "jdoe"
    },
    "socketId": "s0meid",
    "socketIp": "192.168.1.100"
  }
}

📜 License

This project is licensed under the AGPL-3.0-or-later.


🤝 Contributing

Pull requests and issues are welcome!
Check out the issues page.

Node Info

Version: 0.1.4
Updated 2 weeks, 1 day ago
License: AGPL-3.0-or-later
Rating: not yet rated

Categories

Actions

Rate:

Downloads

8 in the last week

Keywords

  • node-red
  • node-red-plugin
  • dashboard
  • oauth2
  • auth
  • oauth2-proxy
  • oidc

Maintainers