Production-grade authentication system with TOTP, RBAC, and pluggable storage.
pnpm add @tummycrypt/tinyland-auth.— core auth: session management, password hashing, permissions, RBAC./sveltekit— SvelteKit integration: hooks, guards, CSRF, session cookies./storage— storage adapter interface + memory/file implementations./types— TypeScript type definitions./totp— TOTP generation and verification./activity— activity tracking./audit— audit logging./cred-gen— credential generation and display./validation— input validation utilities
Implement IStorageAdapter for your backend:
- Built-in:
MemoryStorageAdapter,FileStorageAdapter - Separate packages:
@tummycrypt/tinyland-auth-pg(PostgreSQL),@tummycrypt/tinyland-auth-redis(Upstash Redis)