npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@thomlov81/n8n-nodes-esogr-custom

v0.1.14

Published

Custom n8n nodes for authentication, caching, and access control

Readme

n8n-nodes-custom-auth

Custom n8n nodes for authentication, caching, and access control.

Nodes

Menu Role Auth

A node that handles menu-based role authentication with Redis caching. This node:

  • Fetches menu role permissions from PostgreSQL database
  • Caches permissions in Redis for performance (default: 6 hours TTL)
  • Checks user access based on menu item IDs and user roles
  • Routes to two outputs: Access Granted or Access Denied
  • Returns access control flags (access, limit_org, limit_user, limit_readonly)

Operations

  1. Check Access - Check if user roles have access to specified menu items
  2. Refresh Cache - Force refresh the menu roles cache from database

Outputs

The node has two outputs:

  • Output 1 (Access Granted) - Items where access check passed
  • Output 2 (Access Denied) - Items where access check failed

This allows you to easily route denied requests to return a 403 response via webhook.

Input Parameters

| Parameter | Type | Description | |-----------|------|-------------| | Menu Item IDs | Array/String | Menu item IDs to check access for | | Roles | Array/String | User role short IDs to check | | Cache Key | String | Redis key for caching (default: postgres_cache_base_menuroles) | | Cache TTL | Number | Cache time-to-live in seconds (default: 21600 = 6 hours) | | Schema | String | PostgreSQL schema name (default: public) | | Table | String | Table name for menu roles (default: base_menuRoles) |

Output

{
  "accesscontrol": {
    "access": true,
    "limit_org": false,
    "limit_user": false,
    "limit_readonly": false
  },
  // ... original input data (if passThrough enabled)
}

Credentials

This node uses n8n's built-in credentials:

  • Redis - Select from your existing Redis credentials
  • PostgreSQL - Select from your existing PostgreSQL credentials

No custom credential configuration needed - just select your pre-configured credentials from the dropdown.

Installation

Local Development

  1. Clone this repository
  2. Install dependencies: npm install
  3. Build the nodes: npm run build
  4. Link to your n8n installation:
    cd ~/.n8n/custom
    npm link /path/to/n8n-custom-nodes
  5. Restart n8n

Production

# In your n8n custom nodes directory
npm install @thomlov81/n8n-nodes-custom-auth

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Lint
npm run lint

# Format
npm run format

Database Schema

The node expects a base_menuRoles table with the following structure:

CREATE TABLE base_menuRoles (
  id SERIAL PRIMARY KEY,
  menuId INTEGER NOT NULL,
  role_short_id VARCHAR(50) NOT NULL,
  limit_org BOOLEAN DEFAULT false,
  limit_user BOOLEAN DEFAULT false,
  limit_readonly BOOLEAN DEFAULT false,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Example Workflow

[Webhook] → [Menu Role Auth] → [Access Granted] → [Your Logic]
                            ↘ [Access Denied] → [Respond 403]

License

MIT