Supported Features
Better Auth Ruby tracks upstream Better Auth v1.6.9. The Ruby port focuses on
server-side behavior: Rack apps, framework adapters, database adapters, auth
routes, cookies, sessions, and server plugins.
Browser clients, TypeScript inference, React hooks, and native client storage are outside the Ruby server scope unless a Ruby package explicitly documents an equivalent.
At a Glance
Target
v1.6.9
Upstream Better Auth release used as the source of truth.
Runtime
Rack first
Rails, Sinatra, and Hanami mount the same Rack auth object.
Scope
Server APIs
Ruby docs describe implemented server behavior, not client packages.
Status Key
Supported
Implemented with local Ruby tests for the documented server behavior.
Partial
Main behavior exists, but upstream edge cases or docs coverage are still in progress.
Not supported
Not implemented in Ruby, intentionally out of scope, or not exposed as a public package.
Frameworks
Rack
SupportedCore auth object is a Rack app and can be mounted directly in Rack-compatible servers.
Rails
SupportedMount helpers, ActiveRecord adapter, controller helpers, migrations, generators, plugin schema coverage, and cookie/CSRF compatibility are implemented and tested.
Sinatra
SupportedSinatra extension, Rack mounting, request helpers, and SQL migration Rake tasks are implemented.
Hanami
SupportedHanami 2.3+ integration includes route mounting, action helpers, Sequel adapter, ROM::SQL migrations, relations, repos, and generators.
Core Runtime
Auth factory and API object
SupportedBetterAuth.auth, Rack calls, direct server API access, plugin initialization, runtime context, and error-code merging are implemented.
Endpoint router and middleware
SupportedRack routing, route params, hooks, plugin middleware, redirects, cookies, server-scoped endpoints, origin checks, and rate-limit hooks are implemented.
Email and password
SupportedSign-up, sign-in, password hashing, verification requirements, reset password, set/change password, password utilities, and user updates are implemented.
Social OAuth
SupportedAuthorization URLs, callbacks, sessions, token storage, account linking, unlinking, refresh, access-token routes, and server-side provider factories are implemented.
Sessions and cookies
SupportedSigned cookies, cache cookies, stateless defaults, chunking, deletion, revocation routes, secondary storage, dynamic domains, and Redis-backed session storage are implemented.
CSRF and trusted origins
SupportedOrigin checks, trusted origins, dynamic trusted origins, baseURL allowed hosts, proxy-aware IP handling, and callback validation are implemented.
Database schema and hooks
SupportedBase schema, plugin schema merge, SQL and Rails migration generation, adapter hooks, and Better Auth logical field names are implemented.
OpenAPI
SupportedOpenAPI 3.1.1 generation, upstream base-route inventory, rich request/response schemas, security schemes, servers, plugin endpoint coverage, Scalar reference HTML, theme, and nonce support are implemented and tested.
Storage And Adapters
Memory adapter
SupportedDevelopment and test adapter. Not intended for production persistence.
SQL adapters
SupportedPostgreSQL, MySQL, SQLite, and MSSQL adapters support the core adapter contract, schema DDL, schema-driven joins, logical field mapping, and auth-route persistence.
Rails ActiveRecord adapter
SupportedActiveRecord persistence, schema-driven associations, migrations, mounting helpers, controller helpers, generators, and auth-route persistence are implemented.
MongoDB adapter
SupportedExternal package with document storage, ObjectId and UUID conversion, joins, transactions, schema field mapping, and auth-route persistence.
Redis secondary storage
SupportedExternal package for sessions, active-session indexes, verification-like state, rate limits, prefixed key isolation, and real Redis round trips.
Server Plugins
Access control
SupportedRoles, statements, permissions, and resource/action checks.
Additional fields
SupportedSchema extension and route integration.
Admin
SupportedUser management, sessions, roles, bans, impersonation, destructive endpoints, and permissions.
Anonymous
SupportedAnonymous sign-in/delete and link cleanup.
API key
SupportedCreation, verification, hashing, expiration, quotas, metadata, permissions, storage modes, and API-key sessions.
Bearer
SupportedBearer session resolution, signed/unsigned token modes, and cookie fallback.
Captcha
SupportedreCAPTCHA, hCaptcha, Turnstile, CaptchaFox, protected routes, and score checks.
Custom session
SupportedCustom get-session shaping and optional multi-session list mutation.
Device authorization
SupportedDevice/user codes, polling, slow-down, approval, denial, token exchange, and verification URI behavior.
Email OTP
SupportedSend, check, verify, sign-in, password-reset, change-email flows, attempts, storage modes, and rate limits.
Dub
SupportedCore plugin at packages/better_auth/lib/better_auth/plugins/dub.rb for dub_id lead tracking, optional OAuth linking, injected clients, and non-blocking tracking failures.
Expo server integration
SupportedServer-side authorization proxy, origin override, and trusted deep-link cookie transfer.
Generic OAuth
SupportedCustom OAuth sign-in, callback, link flows, DB/cookie state, dynamic params, issuer checks, and token/userinfo exchange.
Have I Been Pwned
SupportedSHA-1 k-anonymity lookup and protected password routes.
JWT/JWKS
SupportedEdDSA default, RSA/ECDSA algorithms, JWKS publication, rotation helpers, remote verification, and set-auth-jwt.
Last login method
SupportedEmail, SIWE, social, and generic OAuth cookie/user-field updates.
Magic link
SupportedSend/verify, redirects/errors, signup, latest-token verification, and token storage modes.
MCP
SupportedOAuth metadata, registration, authorization-code PKCE, token refresh, userinfo, JWKS, and helper challenge headers.
Multi-session
SupportedDevice sessions, active switching, replacement, revocation, and sign-out cleanup.
OAuth proxy
SupportedCallback rewriting, encrypted cross-origin cookie forwarding, validation, and stateless state restoration.
OAuth provider
SupportedMetadata, registration, clients, consent, auth code, client credentials, tokens, introspection, revocation, userinfo, and logout.
OIDC provider
SupportedDiscovery, prompt/max-age, registration, consent, token flows, userinfo, logout, and client-secret storage modes.
One tap
SupportedGoogle ID-token callback, account reuse/linking, disabled signup, and session cookies.
One-time token
SupportedGenerate/verify, single-use, expiration, cookie behavior, storage modes, and set-ott.
OpenAPI
SupportedGenerator support exists for metadata, route inventory, models, security, rich schemas, path/query parameters, plugin endpoints, and Scalar reference HTML.
Organization
SupportedOrg/member CRUD, invitations, teams, roles, hooks, permissions, and schema migrations.
Passkey
SupportedWebAuthn registration/authentication, challenge cookies, credential management, and schema output.
Phone number
SupportedOTP send/verify, sign-in/sign-up, updates, reset password, attempt limits, and validation hooks.
SCIM
SupportedToken envelopes, Bearer middleware, metadata, user CRUD, provider management, mappings, filters, PATCH, and org enforcement.
SIWE
SupportedNonce, wallet sign-in, ENS hook, account/session creation, EIP-55 casing, and multi-chain wallets.
SSO
SupportedOIDC and SAML provider lifecycle, sign-in/callbacks, domain verification, metadata, and SAML validation in better_auth-sso.
Stripe
SupportedCheckout, portal, webhooks, subscription state transitions, seats, trials, org subscriptions, and metadata helpers.
Two-factor
SupportedTOTP, OTP, backup codes, trusted devices, disable/recovery, and post-login verification.
Username
SupportedUsername sign-up/sign-in, availability, normalization, validation, duplicates, and leak-prevention behavior.
Payments
Stripe
SupportedThe Ruby payment plugin surface is Stripe only.
Other Upstream Plugins
Test Utils
Not supportedThere is no public BetterAuth::Plugins.test_utils Ruby plugin yet. Ruby packages use local test helpers and direct auth.api calls.
Community Plugins
Not supportedThe upstream community plugin page lists JavaScript ecosystem plugins and is not a Ruby support promise.
Agent Auth and i18n
Not supportedNo Ruby package or server plugin implementation exists in this repository today.
Social Providers
Built-in Ruby provider factories are implemented for the providers below.
Use BetterAuth::Plugins.generic_oauth for custom providers that are not part of
the built-in set.
Source Of Truth
The detailed working notes live in: