Choose your recipe
Pick the authentication strategy that fits your app. Mix and match multiple recipes.
Email / Password
Classic email and password authentication with bcrypt hashing and password reset flow.
View docs โOAuth / Social
Sign in with Google, GitHub, or any custom OAuth 2.0 provider using GenericOAuthStrategy.
View docs โMagic Link
Passwordless login via email. First magic-link login counts as email verification.
View docs โSMS OTP
One-time password codes delivered via SMS for phone verification or 2FA.
View docs โTOTP 2FA
Time-based one-time passwords compatible with Google Authenticator and Authy.
View docs โMulti-Tenancy
Isolate users and data across multiple tenants with tenant-aware RBAC.
View docs โAdmin Panel
Self-contained admin dashboard: user management, sessions, roles, tenants, and policy controls.
View docs โAccount Linking
Link multiple OAuth providers to one account. Safe conflict resolution via IPendingLinkStore.
View docs โEvent Bus & Tracking
Publish and subscribe to auth events (login, signup, failureโฆ) with AuthEventBus. Track telemetry with a single tools.track() call.
View docs โReal-time SSE
Push live notifications to connected browsers via Server-Sent Events. No WebSocket server needed.
View docs โWebhooks
Forward auth events to external services with HMAC-signed outgoing webhooks, or execute dynamic inbound scripts in a secure vm sandbox.
View docs โTelemetry
Persist every auth event to any database via ITelemetryStore and query the history through the tools router.
View docs โAI Setup (MCP)
Configure the entire library via natural language using the companion MCP server โ works with VS Code Copilot, Cursor, and Claude.
View docs โWhy node-auth?
| Feature | node-auth | Others |
|---|---|---|
| Database support | Any DB via interface | Specific DBs only |
| Auth strategies | 5+ built-in recipes | Varies |
| Self-hosted | โ Always | Paid tier or limited |
| JWT tokens | โ Access + refresh pair | Often session-only |
| AI-assisted setup | โ MCP server included | โ |
| License | MIT | Mixed |