Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

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

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

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

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

@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

  • Run Node-RED Dashboard 2 behind oauth2-proxy
    (for example with Traefik, Nginx, or another reverse proxy).
  • Ensure oauth2-proxy is configured to forward user headers (e.g. --set-xauthrequest).
  • Open Dashboard → Sidebar → Client Data.
    You should see OAuth2 Proxy listed as a client data provider.
  • In your flows, you can now access user info:
{
  "_client": {
    "user": {
      "userId": "jdoe",
      "email": "jdoe@example.com",
      "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.

Keywords

node-red

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts