Feature Comparison: dracory/auth vs SuperTokens

This document compares github.com/dracory/auth with SuperTokens, a popular open-source authentication provider. It is intended to help decide when dracory/auth is a good fit and when a full auth service is the better choice.

High-Level Differences

Aspectdracory/authSuperTokens
TypeGo library embedded in your appStandalone auth service (core) + SDKs
LanguageGo onlySDKs for Node.js, Go, Python; core in Java
DeploymentNo extra infrastructureRequires running the SuperTokens core service
Data ownershipYour database, your schema (callback-based)SuperTokens-managed schema in MySQL/PostgreSQL
UIBuilt-in, server-rendered HTML pagesPre-built React widgets; other frontends DIY
LicenseSee LICENSE / LICENSE_COMMERCIALApache 2.0 (core) + paid managed/enterprise tiers

Feature Matrix

Featuredracory/authSuperTokens
Email/password (username + password)✅ Built-in flow✅
Otp (email code/link)✅ Email codes + magic links✅ (email or SMS OTP / magic link)
Delegated/external login✅ AuthKnight hosted login flow✅ Social login (Google, GitHub, Apple, etc.)
Social / OAuth providers❌ (only via AuthKnight)✅ Wide provider support
Session management✅ Cookie/session via your store (Bring-your-own store; session invalidation on password reset)✅ Managed sessions, refresh tokens, rotating tokens
MFA / TOTP❌✅ TOTP, email/SMS second factor
User roles & permissions❌ (handled by host app)✅ User roles recipe + permission claims
Account linking❌✅
Email verification✅ (codes via your email service)✅
Password reset✅ Built-in flow✅
Impersonation (admin "login as")✅ Built-in (token swap, audit hooks)✅ (via custom implementation / user impersonation recipe)
CSRF protection✅ dracory/csrf integration✅ Anti-CSRF on cookie auth
Rate limiting / brute-force lockout✅ Built-in per-IP/per-endpoint✅ Built-in throttling + anomaly detection (paid)
Bot detection / CAPTCHA❌✅ (paid feature)
Audit logging✅ log/slog structured logging hooks✅ (via core logs / paid features)
Ready-to-use UI pages✅ Server-rendered, Bootstrap-styled, customizable✅ React components; limited for non-React stacks
JSON API endpoints✅ Built-in RESTful endpoints✅ Exposed via SDK on your API layer
Auth middleware✅ WebAuthOrRedirectMiddleware, ApiAuthOrErrorMiddleware, WebAppendUserIdIfExistsMiddleware✅ Session verification middleware per SDK
Multi-tenancy / orgs❌✅ (paid feature)
SAML / enterprise SSO❌✅ (paid feature)
Database flexibility✅ Any DB — SQL, NoSQL, in-memory (callback-based)⚠️ Requires MySQL/PostgreSQL for the core
Email provider✅ Bring your own (callback)✅ SMTP config / integrations
Self-hosted✅ It's just a library✅ Free self-hosted core; managed cloud paid
Frontend framework requirementNone — server-rendered or SPA-ready APIBest experience with React; vanilla JS possible
Multiple login methods simultaneously✅ Composable via NewMultiMethodAuth + types.Method (otp, magiclink, password, authknight, custom methods){mm}
Remember-me (extended sessions)✅ Built-in opt-in session extension{rm}

Legend: ✅ built-in · ⚠️ partial/conditional · ❌ not available

Branding & Layout Options

Aspectdracory/authSuperTokens
Full layout control✅ FuncLayout wraps any page body in your own site shell (own <head>, nav, footer)⚠️ Prebuilt React UI with style overrides; custom UI option for full control
Theming / CSS✅ ThemeCSS (any hosted stylesheet / Bootlegance) + CustomCSS inline overrides⚠️ Palette/style overrides on prebuilt UI; no standalone theme editor
Brand name / logo✅ BrandName, BrandTagline, BrandLogoURL rendered above the login card⚠️ Via style overrides / your app
Email templates✅ Per-flow FuncEmailTemplate* callbacks — full control✅ Customizable via service layer

When to Choose dracory/auth

external services.

When to Choose SuperTokens

or paying for managed cloud.

Notes

spirit to delegating auth to an external provider, without running your own auth service.

Migrating to SuperTokens later means exporting users and re-mapping sessions.