ZITADEL
A cloud-native open-source Identity and Access Management platform built in Go. ZITADEL features event-sourced architecture for complete audit trails, a Terraform provider for GitOps identity management, and a multi-tenant Organization model ideal for B2B SaaS — available self-hosted or as a managed cloud service.
What is ZITADEL?
ZITADEL is a modern alternative to Keycloak and Auth0, designed for cloud-native and Kubernetes-first environments. Written in Go, it starts in seconds and uses significantly less memory than Java-based IAM platforms. The event-sourced data model means every state change produces an immutable event — your audit log is built-in, not bolted on.
For B2B SaaS, ZITADEL's Organization model is its killer feature: each of your enterprise customers gets their own org with independent SSO configuration, branding, and user management. Your app receives the customer's org ID in every token, making tenant isolation trivial to implement.
Quick Start (Docker)
# ZITADEL — self-hosted with PostgreSQL docker run --rm -d --name zitadel -p 8080:8080 -e ZITADEL_MASTERKEY="MasterkeyNeedsToHave32Characters" -e ZITADEL_DATABASE_POSTGRES_HOST=postgres -e ZITADEL_DATABASE_POSTGRES_PORT=5432 -e ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel -e ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel -e ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel -e ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable -e ZITADEL_EXTERNALDOMAIN=localhost ghcr.io/zitadel/zitadel:latest start-from-init # Admin UI: http://localhost:8080 # First-time setup wizard included
React SPA — PKCE Flow
// PKCE Authorization Code Flow (React SPA)
import { ZITADELAuth } from '@zitadel/react';
const zitadel = ZITADELAuth({
issuer: 'https://issuer.zitadel.cloud', // or your self-hosted instance
clientId: 'your-client-id',
redirectUri: 'https://app.example.com/callback',
scope: 'openid profile email',
});
// Trigger login
await zitadel.authorize();
// Get user info
const userInfo = await zitadel.userInfo(); Node.js JWT Validation
// Node.js backend — validate ZITADEL JWT
import { createRemoteJWKSet, jwtVerify } from 'jose';
const JWKS = createRemoteJWKSet(
new URL('https://issuer.zitadel.cloud/oauth/v2/keys')
);
async function validateToken(token: string) {
const { payload } = await jwtVerify(token, JWKS, {
issuer: 'https://issuer.zitadel.cloud',
audience: 'your-api-resource-id',
});
// payload.sub = user ID
// payload['urn:zitadel:iam:org:project:roles'] = role map
return payload;
}
// Express middleware
app.use(async (req, res, next) => {
const token = req.headers.authorization?.split(' ')[1];
if (!token) return res.status(401).json({ error: 'Unauthorized' });
req.user = await validateToken(token);
next();
}); Terraform Provider
# ZITADEL Terraform Provider — Infrastructure as Code
terraform {
required_providers {
zitadel = {
source = "zitadel/zitadel"
version = "~> 2.0"
}
}
}
provider "zitadel" {
domain = "issuer.zitadel.cloud"
insecure = false
port = "443"
jwt_profile_file = "service-account.json"
}
resource "zitadel_project" "my_project" {
name = "My App"
org_id = data.zitadel_org.default.id
project_role_assertion = true
project_role_check = true
has_project_check = true
}
resource "zitadel_application_oidc" "spa" {
project_id = zitadel_project.my_project.id
org_id = data.zitadel_org.default.id
name = "SPA"
redirect_uris = ["https://app.example.com/callback"]
response_types = ["OIDC_RESPONSE_TYPE_CODE"]
grant_types = ["OIDC_GRANT_TYPE_AUTHORIZATION_CODE"]
app_type = "OIDC_APP_TYPE_USER_AGENT"
auth_method_type = "OIDC_AUTH_METHOD_TYPE_NONE" # PKCE
dev_mode = false
} Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JSON Formatter & Validator
Format, beautify, and validate JSON online. Paste your JSON to instantly pretty-print it with 2-space, 4-space, or tab indentation. Minify JSON too. Free, runs in your browser.
Open free tool →
Regex Tester
Free regex tester. Test regular expressions against multiple strings with expected match/no-match assertions — see instant pass/fail results. Built-in presets for email, URL, IPv4, and phone. Pro: unl
Open free tool →
Base64 Encoder & Decoder
Free Base64 Encoder & Decoder. Convert text, images, and any file to Base64 and back. Supports URL-safe Base64, image data URIs, and file download from Base64. Runs 100% in your browser — no data sent
Open free tool →
More Free Tools
Related Articles
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
Best AI Code Review Tools 2026: CodeRabbit, Sourcery, DeepCode & Bito Compared
Compare top AI code review tools for 2026: CodeRabbit, Sourcery, DeepCode, and Bito. Features, pricing, GitHub/GitLab integration, and choosing the right tool for your team.
AI Code Review Tools 2026: GitHub Copilot, CodeRabbit, Qodo Merge Ranked
Compare AI code review tools for 2026: GitHub Copilot code review, CodeRabbit, Qodo Merge, Sourcery, and PR-Agent. Pricing, accuracy, and GitHub integration.
AI Coding Tools Comparison 2026: GitHub Copilot vs Cursor vs Windsurf vs Cline
Comprehensive comparison of the best AI coding tools in 2026: GitHub Copilot, Cursor, Windsurf, and Cline. Pricing, features, model support, and real-world benchmarks.
AI Pair Programming in 2026: GitHub Copilot vs Cursor vs Claude Code
Master AI pair programming in 2026. Compare GitHub Copilot, Cursor, and Claude Code for autocomplete, chat, and agentic workflows. Includes setup guides and productivity tips.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →