Minimal, opinionated authentication server (v0.2.0) for apps needing a solid auth core without external dependencies. Supports password-less sign-in via email OTP, WebAuthn passkeys, and Ed25519 keys. Uses SQLite for storage, issues JWT access tokens with opaque refresh tokens, and provides JWKS endpoints for key rotation. Released infrequently as a pre-1.0 project. Differentiates from Auth0/Firebase by being self-hosted with no external database servers required.
npm install auth-miniVerified import paths — ran on the pinned version, not inferred.
Shows how to create and start an Auth Mini server with email transport, CORS configuration, and required secrets.
Upgrade Node.js to v20.10.0 or later.
Use import syntax or dynamic import() in CommonJS files.
Use import { AuthMini } from 'auth-mini'; instead of default import.Set database to 'file:./auth.db' or similar absolute 'file:' URI.
Provide a JWT secret of at least 32 characters.
Provide two distinct secrets for session and JWT.
Use import statement or dynamic import() instead of require().
Ensure you imported correctly: const server = authMin(options); await server.start();
Provide a secret string of 32 or more characters.
Set database to 'file:./auth.db' (with file: prefix) and ensure directory exists.
Set cors.origin to a string URL or array of strings.