@aeonkey/sqlite
v0.1.0
Published
SQLite storage adapter for AeonKey.
Maintainers
Readme
@aeonkey/sqlite
SQLite storage adapter for AeonKey.
Install
pnpm add @aeonkey/core @aeonkey/sqlite better-sqlite3Usage
import Database from "better-sqlite3";
import { SessionService } from "@aeonkey/core";
import { SqliteAuthStore, createSqliteAuthSchema } from "@aeonkey/sqlite";
const db = new Database("auth.db");
createSqliteAuthSchema(db);
const store = new SqliteAuthStore(db);
const sessions = new SessionService({ store });The store implements the durable AeonKey contracts for:
- accounts
- sessions
- email verification requests
- password reset sessions
- recovery codes
- TOTP credentials
- WebAuthn challenges and credentials
- persistent rate-limit buckets
createSqliteAuthSchema() creates the demo/reference schema. Review and own migrations in production applications.
