better-auth
Self-hosted TypeScript auth for Cloudflare Workers with OAuth, 2FA, passkeys, organizations, and 80+ production-ready endpoints.
- Requires Drizzle ORM or Kysely for D1 (no direct adapter); use
drizzleAdapter()ornew Kysely({ dialect: new D1Dialect() })withnodejs_compatflag in wrangler.toml - Provides 80+ auto-generated REST endpoints covering authentication, sessions, 2FA, organizations, admin operations, and social OAuth—zero endpoint code needed
- Includes 15+ plugins: OAuth 2.1 Provider, SSO (SAML/OIDC), Stripe, Passkey, Magic Link, Email OTP, Anonymous, Bearer tokens, API keys, and more
- Supports stateless JWT sessions, session caching via KV, rate limiting, database hooks, and fresh session enforcement; breaking changes in v1.4.0 (ESM-only) and v1.4.6 (admin impersonation disabled by default)
better-auth - D1 Adapter & Error Prevention Guide
Package: better-auth@1.4.16 (Jan 21, 2026) Breaking Changes: ESM-only (v1.4.0), Admin impersonation prevention default (v1.4.6), Multi-team table changes (v1.3), D1 requires Drizzle/Kysely (no direct adapter)
⚠️ CRITICAL: D1 Adapter Requirement
better-auth DOES NOT have d1Adapter(). You MUST use:
- Drizzle ORM (recommended):
drizzleAdapter(db, { provider: "sqlite" }) - Kysely:
new Kysely({ dialect: new D1Dialect({ database: env.DB }) })
See Issue #1 below for details.
What's New in v1.4.10 (Dec 31, 2025)
More from jezweb/claude-skills
tailwind-v4-shadcn
|
2.7Ktanstack-query
|
2.5Kshadcn-ui
Install and configure shadcn/ui components for React projects. Guides component selection, installation order, dependency management, customisation with semantic tokens, and common UI recipes (forms, data tables, navigation, modals). Use after tailwind-theme-builder has set up the theme infrastructure, when adding components, building forms, creating data tables, or setting up navigation.
2.5Ktailwind-theme-builder
>
2.2Kfastapi
|
2.0Kcolor-palette
>
1.9K