Package Information
Released: 8/18/2025
Downloads: 2 weeklyĀ /Ā 13 monthly
Latest Version: 0.2.0
Author: Aliou Diallo
Documentation
n8n JWT Authentication Nodes
Comprehensive JWT (JSON Web Token) nodes for n8n workflows. Sign, decode, verify, and validate JWT tokens with support for JWKS (JSON Web Key Set) endpoints.
Features
- š Complete JWT Operations: Sign, Decode, Verify, and Validate tokens
- š JWKS Support: Automatic key fetching from JWKS endpoints
- ā Comprehensive Validation: Claims, expiration, audience, issuer checks
- šÆ Dual Outputs: Separate success/error paths for better workflow control
- š§ Flexible Configuration: Multiple token sources and extraction methods
- š”ļø Security First: Clear separation between verification and validation
Installation
In n8n
- Go to Settings > Community Nodes
- Search for
@general-dexterity/n8n-nodes-jwt-auth - Click Install
Manual Installation
npm install -g @general-dexterity/n8n-nodes-jwt-auth
Docker
Add to your docker-compose.yml:
services:
n8n:
image: n8nio/n8n
environment:
- N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
volumes:
- ./n8n-nodes-jwt-auth:/home/node/.n8n/custom/node_modules/@general-dexterity/n8n-nodes-jwt-auth
Nodes Included
š JWT Auth
All-in-one node for JWT operations:
- Sign: Create and sign new tokens
- Decode: Parse tokens without verification
- Verify: Verify signature using JWKS
- Validate: Check structure and claims
ā JWT Auth Verify
Dedicated node for JWT signature verification using JWKS endpoints.
š JWT Auth Validate
Validate JWT structure and claims without signature verification.
Credentials
š JWT Auth JWKS
Configure JWKS endpoints for token verification.
šļø JWT Auth Key
Store signing keys for creating JWT tokens.
Quick Start
Verify Incoming JWT Tokens
- Add Webhook Trigger
- Add JWT Auth node
- Operation:
Verify - Token Source:
Authorization Header
- Operation:
- Configure JWKS credential
- JWKS URL:
https://your-provider/.well-known/jwks.json - Expected Issuer:
https://your-provider - Expected Audience:
your-api
- JWKS URL:
- Handle outputs
- Success ā Continue processing
- Error ā Return 401 Unauthorized
Create Signed Tokens
- Add JWT Auth node
- Operation:
Sign
- Operation:
- Configure JWT Auth Key credential
- Key Type:
PEM KeyorPassphrase - Algorithm:
RS256orHS256
- Key Type:
- Set payload
- Use JSON or individual claims
- Set expiration time
- Use generated token in HTTP requests
Common JWKS Endpoints
| Provider | JWKS URL Format |
|---|---|
| Auth0 | https://{domain}.auth0.com/.well-known/jwks.json |
| Okta | https://{domain}.okta.com/oauth2/default/v1/keys |
| AWS Cognito | https://cognito-idp.{region}.amazonaws.com/{poolId}/.well-known/jwks.json |
| Azure AD | https://login.microsoftonline.com/{tenant}/discovery/v2.0/keys |
https://www.googleapis.com/oauth2/v3/certs |
Token Extraction Methods
Authorization Header
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
JSON Field
{
"token": "eyJhbGciOiJSUzI1NiIs...",
"data": "..."
}
Supports dot notation: body.token, data.auth.jwt
Raw String
Direct token input for testing or when already extracted.
Workflow Examples
API Authentication Flow
Webhook ā JWT Auth (Verify) ā Process Request
ā (Error)
Return 401 Response
Token Generation for External API
Trigger ā Get User Data ā JWT Auth (Sign) ā HTTP Request with Token
Token Inspection
Webhook ā JWT Auth (Decode) ā Analyze Claims ā Route Based on Role
Testing
A complete Docker-based testing environment is provided:
cd tests
docker-compose up -d
This includes:
- n8n instance with the JWT nodes
- Mock JWKS server for testing
- Example workflows
- Token generation scripts
Security Considerations
- ā ļø Never use Decode for authentication - it doesn't verify signatures
- ā ļø Validate doesn't check signatures - use only when appropriate
- ā Always use Verify for production authentication
- š Keep signing keys secure in n8n credentials
- š Regularly rotate signing keys
- š Use HTTPS for all JWKS endpoints
Development
Building from Source
# Install dependencies
pnpm install
# Build the nodes
pnpm build
# Run tests
pnpm test
Project Structure
āāā credentials/ # Credential types
āāā nodes/ # Node implementations
āāā docs/ # Documentation
āāā tests/ # Test environment
āāā assets/ # Icons and images
Support
- š Report Issues
- š” Request Features
- š Documentation
- š¬ Discussions
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
License
MIT - see LICENSE file for details.