Framework agnostic
Works with Next.js, SvelteKit, Nuxt, TanStack Start, Express, Hono, and any framework that can get, set, and delete cookies.
Session auth, password hashing, 2FA, token verification, and rate limiting. Bring your own schema. Works with any framework.
resolveUser and resolveUserByCredentials — use any database, any schema.httpOnly cookies are always forced on. bcrypt uses SHA-256 prehash for long passwords. All comparisons are timing-safe. secure defaults to true in production.createAuth — Session authentication with encrypted cookies, login, logout, and user resolutioncreateHash — bcrypt password hashing with automatic SHA-256 prehash for passwords exceeding 72 bytescreateTokenVerifier — Signed, expiring tokens for password resets, email verification, and similar flowscreateTOTP — RFC 6238 time-based one-time passwords for two-factor authenticationgenerateRecoveryCodes — Hashed backup codes for 2FA recoverycreateRateLimiter — Sliding-window rate limiting with pluggable storesencrypt/decrypt, signData/verifySignature, timingSafeEqual, generateToken