wellworn
traps · 2 served

Better Auth

better-auth · latest 1.7.3 · MIT

Framework-agnostic TypeScript auth with plugins for organizations, API keys, admin roles, passkeys.

symptom and fix
major · >=1.0.0 · published · verified 2026-09-08
Role or plan changes do not reach the session until the cookie cache expires (default 5 minutes).
Disable `session.cookieCache` for role-gated apps, or call `auth.api.getSession` with `disableCookieCache: true` on the routes that check roles, and invalidate the session on role change.
minor · >=1.0.0 · published · verified 2026-09-08
Drizzle adapter cannot find plugin tables (organization, apikey) and fails at runtime, not at build.
Pass the full `schema` object to `drizzleAdapter(db, { provider: "pg", schema })` and re-run `npx @better-auth/cli generate` after adding any plugin, then migrate.

Sorted by severity. Your agent sees the subset that matches the version you have installed: traps(library: "better-auth", version: "1.7.3").