@byronwade/auth
v0.1.0
Published
Local auth engine for Fakebase — password, OTP, sessions, SSR cookies
Maintainers
Readme
@byronwade/auth
Part of Fakebase — a Supabase-shaped, local/dev-only development platform for Next.js prototypes. Not for production use.
The local auth engine — email/password, OTP, PKCE, and pluggable session storage. It mirrors the supabase.auth surface and backs the db.auth facade.
Installation
pnpm add fakebaseThis package ships with fakebase and is published as @byronwade/auth.
Usage
import { LocalAuthService, MemorySessionStorage } from "@byronwade/auth";
const auth = new LocalAuthService(new Map(), new Map(), new MemorySessionStorage());
await auth.signUp({ email: "[email protected]", password: "password" });
const result = await auth.signInWithPassword({
email: "[email protected]",
password: "password",
});What's inside
LocalAuthService—signUp,signInWithPassword,signInWithOtp,verifyOtp, and more (+LocalAuthServiceOptions).- Session storage adapters:
MemorySessionStorage,CookieSessionStorage(SSR),LocalStorageSessionStorage. - PKCE helpers:
generateCodeVerifier,generateCodeChallenge,generateAuthCode,PkceStore. - Types:
LocalUser,LocalSession,AuthStateChangeEvent,OtpRecord,SessionStorageAdapter.
Dev-only — credentials and OTP codes are handled locally and are not production-grade. OTPs land in a local inbox instead of real email/SMS.
Documentation
License
MIT
