@fonderie/auth
v7.7.0
Published
Drop-in auth for SaaS — email/password, phone OTP, Google OAuth, stateless JWT sessions, TOTP-based MFA with backup codes, and self-service password recovery.
Maintainers
Readme
@fonderie/auth
Drop-in auth for SaaS: email/password, phone OTP, Google OAuth, and stateless JWT sessions — shipped as a brick that registers its routes, migrations, and events in one line.
Install
npm install @fonderie/authUse
import { FonderieApp, defineConfig } from '@fonderie/core';
import { AuthModule } from '@fonderie/auth';
const app = await new FonderieApp(defineConfig({}))
.register(new AuthModule())
.boot();Guard your own routes with the exported middlewares:
import { withSession, requireAuth } from '@fonderie/auth';Also exports toUserDTO, normalizeEmail, and the full type surface
(IUser, ISession, IMfaChallenge, …).
Why this exists
You've shipped this plumbing before — auth, teams, billing, messaging —
and the next project will ask for it again. Fonderie packages it once:
plain TypeScript modules for
@fonderie/core,
PostgreSQL-backed, self-hosted, MIT. No external control plane, no
per-seat anything. Register the modules you need; skip the ones you don't.
This package owns who the caller is. Identity, credentials, sessions, and MFA — every
other brick trusts the ctx.user this one establishes.
Browse the whole set at fonderiejs/sdk · follow @fonderiejs
License
MIT © Fonderie, Inc.
