mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
Introduce the foundational Plugin Extension Protocol — a typed, declarative mechanism for plugins to extend other plugins. - BetterAuthExtensionRegistry: empty interface augmented by host plugins via declare module (parallel to BetterAuthPluginRegistry) - extensions field on BetterAuthPlugin: typed via registry, gives compile-time checking and IDE autocomplete for extension contracts - dependencies field on BetterAuthPlugin: validated at startup, throws BetterAuthError with descriptive message if missing - getExtensions(hostId) on AuthContext: collects typed extension contributions from all plugins targeting a host - Dependency validation in runPluginInit: fail-fast before any init runs - Docs: Plugin Extension Protocol section in concepts/plugins.mdx
Better Auth Core
Core utilities and types for Better Auth — the most comprehensive authentication framework for TypeScript.
Installation
npm install @better-auth/core
Documentation
For full documentation, visit better-auth.com.
License
MIT