@nightowlsdev/auth-sessions
AuthA small, pg-backed revocable session store, logout, log-out-everywhere, and admin kill without shortening JWT TTLs.
What it does
@nightowlsdev/auth-sessions makes otherwise-stateless session JWTs REVOCABLE: a session is live only while its `jti` row exists, is not revoked, and is not expired, giving you logout, log-out-everywhere, and admin/abuse kill without shortening the token TTL. `makeSessionStore` runs parameterized queries against a `pg` Pool you provide (pg is a peer dependency, you own the Pool), and it ships the table DDL as an installable migration (`MIGRATIONS`). Server-only. Also exports the CLI plugin manifest.
Install
pnpm add @nightowlsdev/auth-sessionsKey exports
- makeSessionStore
- nightOwlsPlugin
- MIGRATIONS
Usage
import * as pkg from "@nightowlsdev/auth-sessions";