authentik
An open-source Identity Provider with a unique visual Flow Engine for custom authentication pipelines. authentik supports OIDC, OAuth 2.0, SAML, forward authentication (protect any app via nginx/Traefik without code changes), and enterprise LDAP/SCIM — all configurable from a rich admin UI.
What is authentik?
authentik's defining feature is its Flow Engine: authentication is a sequence of configurable Stages (identification, password check, MFA, consent, email verification) with Python expression Policies controlling which stages activate for which users. This visual pipeline lets non-engineers customize the entire login experience — add invite-only registration, require MFA for admin users, or redirect enterprise users to their SAML provider — all from the admin UI.
The Outpost system is authentik's other standout feature: deploy an authentik Outpost as a Traefik or nginx forward-auth middleware, and any app behind the proxy gets SSO protection without changes to the app itself. This makes authentik ideal for protecting internal tools, dashboards, and legacy applications that can't be instrumented.
Quick Start (Docker Compose)
# authentik — docker-compose setup # 1. Download official compose file curl -O https://goauthentik.io/docker-compose.yml # 2. Generate secret key and admin password echo "AUTHENTIK_SECRET_KEY=$(openssl rand -base64 36)" >> .env echo "AUTHENTIK_BOOTSTRAP_PASSWORD=your-admin-password" >> .env echo "AUTHENTIK_BOOTSTRAP_TOKEN=your-api-token" >> .env # Optional: email config for invites and MFA cat >> .env << 'EOF' AUTHENTIK_EMAIL__HOST=smtp.gmail.com AUTHENTIK_EMAIL__PORT=587 [email protected] AUTHENTIK_EMAIL__PASSWORD=app-password [email protected] EOF # 3. Start docker compose up -d # Access: http://localhost:9000/if/flow/initial-setup/
Provider Types
# authentik Provider types # Available via Admin UI → Applications → Providers # OIDC/OAuth2 Provider - Protocol: OpenID Connect / OAuth2 - Client ID: (auto-generated or custom) - Client Secret: (auto-generated) - Redirect URIs: https://app.example.com/callback - Scopes: openid, email, profile, groups # SAML Provider (for enterprise SSO) - SSO URL: https://auth.example.com/application/saml/myapp/sso/binding/post/ - Entity ID: https://app.example.com/saml/metadata # Proxy Provider (forward auth for nginx/Traefik) - Internal host: http://myapp:3000 - External host: https://app.example.com - Authentik handles auth; proxies valid requests
Flow Engine Examples
# authentik Flows — customize the login experience
# Flows are the building blocks of the auth UX
Default flow order:
1. Identification Stage → ask for username or email
2. Password Stage → check password
3. MFA Stage → TOTP / WebAuthn / SMS (if enrolled)
4. User Login Stage → create session
Custom flow examples:
- Passwordless: Identification → WebAuthn → Login
- Invite-only: Email Verification → Password Set → Login
- B2B SSO: Source redirect → SAML assertion → Login
# Policies (Python expressions) control flow branching:
# "Show MFA only if user is in 'admin' group"
return ak_is_group_member(request.user, name="admins")
# "Block login from certain IPs"
from netaddr import IPNetwork, IPAddress
return IPAddress(request.context["remote_ip"]) not in IPNetwork("10.0.0.0/8") Forward Auth (Traefik/nginx)
# authentik Outpost — forward auth for nginx/Traefik
# Traefik labels
labels:
- traefik.http.middlewares.authentik.forwardauth.address=http://authentik-outpost:9000/outpost.goauthentik.io/auth/traefik
- traefik.http.middlewares.authentik.forwardauth.trustForwardHeader=true
- traefik.http.middlewares.authentik.forwardauth.authResponseHeaders=X-authentik-username,X-authentik-uid,X-authentik-groups
# Nginx location block
location / {
auth_request /outpost.goauthentik.io/auth/nginx;
error_page 401 = @goauthentik_proxy_signin;
auth_request_set $authentik_status $upstream_status;
} 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 →