{"id":21601,"library":"n8n-nodes-auth-service","title":"n8n-nodes-auth-service","description":"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.","status":"active","version":"0.4.6","language":"javascript","source_language":"en","source_url":"https://github.com/ShlomiPorush/n8n-nodes-auth-service","tags":["javascript","n8n-community-node-package","n8n","auth","token","validate","typescript"],"install":[{"cmd":"npm install n8n-nodes-auth-service","lang":"bash","label":"npm"},{"cmd":"yarn add n8n-nodes-auth-service","lang":"bash","label":"yarn"},{"cmd":"pnpm add n8n-nodes-auth-service","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for n8n node compatibility","package":"n8n-workflow","optional":false}],"imports":[{"note":"ESM-only package; named export for the action node class","wrong":"const AuthServiceV1 = require('n8n-nodes-auth-service').AuthServiceV1","symbol":"AuthServiceV1","correct":"import { AuthServiceV1 } from 'n8n-nodes-auth-service'"},{"note":"Named export, not default; ESM-only","wrong":"import AuthWebhookV1 from 'n8n-nodes-auth-service'","symbol":"AuthWebhookV1","correct":"import { AuthWebhookV1 } from 'n8n-nodes-auth-service'"},{"note":"Type-only export; import from types subpath for type usage","wrong":"import { N8nNodeAuthService } from 'n8n-nodes-auth-service'","symbol":"N8nNodeAuthService","correct":"import { N8nNodeAuthService } from 'n8n-nodes-auth-service/types'"}],"quickstart":{"code":"// n8n workflow using Auth Service node via code (not UI)\nimport { Workflow, WorkflowDataProxy } from 'n8n-workflow';\nimport { AuthServiceV1 } from 'n8n-nodes-auth-service';\n\n// Example: Validate token node\nconst node = new AuthServiceV1();\nconst result = await node.execute({\n  credentials: {\n    authServiceApi: {\n      baseUrl: process.env.AUTH_SERVICE_BASE_URL ?? 'http://localhost:8080',\n      apiKey: process.env.AUTH_SERVICE_API_KEY ?? ''\n    }\n  },\n  parameters: {\n    operation: 'validateToken',\n    token: 'Bearer my-token',\n    zone: 'orders',\n    level: 'read'\n  }\n});\nconsole.log('Validation result:', result);\n// Output: { result: true }","lang":"typescript","description":"Shows how to use the Auth Service node programmatically to validate a token against a zone with read level."},"warnings":[{"fix":"Use exact package name 'n8n-nodes-auth-service' in npm install and imports.","message":"The npm package name uses hyphens but the import path is also the package name; ensure correct casing.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Use dynamic import() or switch to ESM environment.","message":"Package is ESM-only. Do not use require() in CommonJS contexts; will throw at runtime.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Ensure the Auth Service endpoint is reachable and /tokens/ping responds 200.","message":"Credentials 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.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Test deletion in a non-production environment first.","message":"Operation 'Delete Token' is marked as permanent; no undo. Some deployments may lack token deletion support.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Ensure clients send token in the expected header.","message":"Auth Webhook node requires the token to be passed in the Authorization header (Bearer) or custom header; missing header causes 403 without detailed error.","severity":"gotcha","affected_versions":">=0.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change to import or use dynamic import: const mod = await import('n8n-nodes-auth-service');","cause":"Using CommonJS require() to import an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Ensure credentials are provided with correct format: { authServiceApi: { baseUrl, apiKey } }","cause":"Missing or malformed authentication credentials object in node execution.","error":"TypeError: Cannot read properties of undefined (reading 'credentials')"},{"fix":"Pass token as 'Bearer <actual_token>' or match the configured token source.","cause":"Token parameter does not include 'Bearer ' prefix or is empty.","error":"400 Bad Request: Invalid token format"},{"fix":"Update n8n to latest version and ensure n8n-workflow is installed: npm install n8n-workflow@latest","cause":"Incompatible n8n version or missing peer dependency n8n-workflow.","error":"n8n community node: Failed to load node 'Auth Service'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}