Host your own JWT authentication system with Data Tables and token management
Ready for 3.0What this workflow does
This workflow has 63 nodes and runs when an HTTP POST request hits its webhook URL (plus 4 other triggers). It uses only n8n's built-in nodes.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 4 other triggers).
- Process login webhook (Edit Fields (Set)): sets 2 fields: email, password
- Parse Register Request (Edit Fields (Set)): sets 3 fields: email, username, password
- Process Refresh Token (Edit Fields (Set)): sets 1 field: refresh_token
- Process Verify Token Webhook (Edit Fields (Set)): sets 1 field: access_token
- Parse JWT (Code): runs custom JavaScript code
- SET ACCESS AND REFRESH SECRET (Edit Fields (Set)): sets 2 fields: ACCESS_SECRET, REFRESH_SECRET
- Validate Registration Request (Code): runs custom JavaScript code
- SET ACCESS AND REFRESH SECRET (Edit Fields (Set)): sets 2 fields: ACCESS_SECRET, REFRESH_SECRET
- SET ACCESS AND REFRESH SECRET (Edit Fields (Set)): sets 2 fields: ACCESS_SECRET, REFRESH_SECRET
- Verify Input (Code): runs custom JavaScript code
…plus 48 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (9)
- Crypto
n8n-nodes-base.crypto - Edit Fields (Set)
n8n-nodes-base.set - Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - If
n8n-nodes-base.if - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger
From the author
Description A production-ready authentication workflow implementing secure user registration, login, token verification, and refresh token mechanisms. Perfect for adding authentication to any application without needing a separate auth service. Get started…