Skip to content

Plugins

26 plugins ship with the package under better_auth.plugins_ext. Each one is a class; pass instances to BetterAuth(plugins=[...]).

python
from better_auth import BetterAuth
from better_auth.plugins_ext import OrganizationPlugin, TwoFactorPlugin

auth = BetterAuth(
    secret="a-strong-32-character-minimum-secret",
    plugins=[TwoFactorPlugin(issuer="Example"), OrganizationPlugin()],
)

Plugins add routes under base_path, extend the database schema (their tables migrate exactly like the core ones), and hook the request pipeline. Every constructor option mirrors the TypeScript option of the same name in snake_case, with the same default. better_auth.plugins_ext.__all__ is the authoritative list. Each plugin has its own page:

Sign-in methods

Organizations and access control

  • Admin — user administration, bans, impersonation
  • Organization — organizations, members, invitations, teams

Tokens and keys

  • API Key — long-lived database-backed API keys
  • JWT — signed JWTs plus a published JWKS
  • Bearer Token — the set-auth-token response header
  • One-Time Token — single-use session handoff tokens

Being an OAuth server

Federating outward

  • SSO (OIDC) — OIDC identity providers per domain or organization
  • Generic OAuth — any OAuth2/OIDC provider, configured at runtime
  • OAuth Proxy — social login from preview deployments
  • OAuth Popup — social sign-in in a popup window

Session shaping

Abuse prevention

Writing your own

Everything above uses the same public surface your plugin has — see Core concepts.

MIT licensed · API-compatible with better-auth