Registry / auth-security / n8n-nodes-auth-service

n8n-nodes-auth-service

JSON →
library0.4.6jsnpmunverified

n8n community node package (v0.4.6, stable) integrating with Auth Service, a self-hosted token authentication and authorization microservice. Provides two nodes: an Auth Service action node for full API access (validate tokens, manage zones and tokens) and an Auth Webhook trigger node that automatically validates tokens before workflow execution, replacing a multi-node setup. Key differentiators: zone-based permissions with read/write/delete/all levels; Docker deployment with Redis + SQLite/PostgreSQL; MFA-protected admin dashboard. Ships TypeScript types, depends on n8n-workflow.

npm install n8n-nodes-auth-service
INSTALL
IMPORT
SIG · N8N-NODES-AUTH-SER
N
n8n-nodes-auth-service
auth-securityjavascriptv0.4.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AuthServiceV1
import { AuthServiceV1 } from 'n8n-nodes-auth-service'
const AuthServiceV1 = require('n8n-nodes-auth-service').AuthServiceV1
ESM-only package; named export for the action node class
AuthWebhookV1
import { AuthWebhookV1 } from 'n8n-nodes-auth-service'
import AuthWebhookV1 from 'n8n-nodes-auth-service'
Named export, not default; ESM-only
N8nNodeAuthService
import { N8nNodeAuthService } from 'n8n-nodes-auth-service/types'
import { N8nNodeAuthService } from 'n8n-nodes-auth-service'
Type-only export; import from types subpath for type usage

Shows how to use the Auth Service node programmatically to validate a token against a zone with read level.

// n8n workflow using Auth Service node via code (not UI) import { Workflow, WorkflowDataProxy } from 'n8n-workflow'; import { AuthServiceV1 } from 'n8n-nodes-auth-service'; // Example: Validate token node const node = new AuthServiceV1(); const result = await node.execute({ credentials: { authServiceApi: { baseUrl: process.env.AUTH_SERVICE_BASE_URL ?? 'http://localhost:8080', apiKey: process.env.AUTH_SERVICE_API_KEY ?? '' } }, parameters: { operation: 'validateToken', token: 'Bearer my-token', zone: 'orders', level: 'read' } }); console.log('Validation result:', result); // Output: { result: true }
Debug
Known issues
gotchaThe npm package name uses hyphens but the import path is also the package name; ensure correct casing.
fix
Use exact package name 'n8n-nodes-auth-service' in npm install and imports.
affects: >=0.1
breakingPackage is ESM-only. Do not use require() in CommonJS contexts; will throw at runtime.
fix
Use dynamic import() or switch to ESM environment.
affects: >=0.4.0
gotchaCredentials with invalid API Key or Base URL may silently fail during testing; credential test calls GET /tokens/ping which may be disabled on some setups.
fix
Ensure the Auth Service endpoint is reachable and /tokens/ping responds 200.
affects: >=0.1
deprecatedOperation 'Delete Token' is marked as permanent; no undo. Some deployments may lack token deletion support.
fix
Test deletion in a non-production environment first.
affects: >=0.4.0
gotchaAuth Webhook node requires the token to be passed in the Authorization header (Bearer) or custom header; missing header causes 403 without detailed error.
fix
Ensure clients send token in the expected header.
affects: >=0.1
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using CommonJS require() to import an ESM-only package.
fix
Change to import or use dynamic import: const mod = await import('n8n-nodes-auth-service');
TypeError: Cannot read properties of undefined (reading 'credentials')
Missing or malformed authentication credentials object in node execution.
fix
Ensure credentials are provided with correct format: { authServiceApi: { baseUrl, apiKey } }
400 Bad Request: Invalid token format
Token parameter does not include 'Bearer ' prefix or is empty.
fix
Pass token as 'Bearer <actual_token>' or match the configured token source.
n8n community node: Failed to load node 'Auth Service'
Incompatible n8n version or missing peer dependency n8n-workflow.
fix
Update n8n to latest version and ensure n8n-workflow is installed: npm install n8n-workflow@latest
Upgrade
Version history
0.4.6latest on npm
Audit
Dependencies
n8n-workflowrequiredpeer dependency required for n8n node compatibility
Agent activity
14 hits · last 30 days
node
12
Amazon
1
Resources
n8n-nodes-auth-service — npm install n8n-nodes-auth-service · libregistry