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

Supported

Core auth object is a Rack app and can be mounted directly in Rack-compatible servers.

Rails

Supported

Mount helpers, ActiveRecord adapter, controller helpers, migrations, generators, plugin schema coverage, and cookie/CSRF compatibility are implemented and tested.

Sinatra

Supported

Sinatra extension, Rack mounting, request helpers, and SQL migration Rake tasks are implemented.

Hanami

Supported

Hanami 2.3+ integration includes route mounting, action helpers, Sequel adapter, ROM::SQL migrations, relations, repos, and generators.

Core Runtime

Auth factory and API object

Supported

BetterAuth.auth, Rack calls, direct server API access, plugin initialization, runtime context, and error-code merging are implemented.

Endpoint router and middleware

Supported

Rack routing, route params, hooks, plugin middleware, redirects, cookies, server-scoped endpoints, origin checks, and rate-limit hooks are implemented.

Email and password

Supported

Sign-up, sign-in, password hashing, verification requirements, reset password, set/change password, password utilities, and user updates are implemented.

Social OAuth

Supported

Authorization URLs, callbacks, sessions, token storage, account linking, unlinking, refresh, access-token routes, and server-side provider factories are implemented.

Sessions and cookies

Supported

Signed cookies, cache cookies, stateless defaults, chunking, deletion, revocation routes, secondary storage, dynamic domains, and Redis-backed session storage are implemented.

CSRF and trusted origins

Supported

Origin checks, trusted origins, dynamic trusted origins, baseURL allowed hosts, proxy-aware IP handling, and callback validation are implemented.

Database schema and hooks

Supported

Base schema, plugin schema merge, SQL and Rails migration generation, adapter hooks, and Better Auth logical field names are implemented.

OpenAPI

Supported

OpenAPI 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

Supported

Development and test adapter. Not intended for production persistence.

SQL adapters

Supported

PostgreSQL, 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

Supported

ActiveRecord persistence, schema-driven associations, migrations, mounting helpers, controller helpers, generators, and auth-route persistence are implemented.

MongoDB adapter

Supported

External package with document storage, ObjectId and UUID conversion, joins, transactions, schema field mapping, and auth-route persistence.

Redis secondary storage

Supported

External package for sessions, active-session indexes, verification-like state, rate limits, prefixed key isolation, and real Redis round trips.

Server Plugins

Access control

Supported

Roles, statements, permissions, and resource/action checks.

Additional fields

Supported

Schema extension and route integration.

Admin

Supported

User management, sessions, roles, bans, impersonation, destructive endpoints, and permissions.

Anonymous

Supported

Anonymous sign-in/delete and link cleanup.

API key

Supported

Creation, verification, hashing, expiration, quotas, metadata, permissions, storage modes, and API-key sessions.

Bearer

Supported

Bearer session resolution, signed/unsigned token modes, and cookie fallback.

Captcha

Supported

reCAPTCHA, hCaptcha, Turnstile, CaptchaFox, protected routes, and score checks.

Custom session

Supported

Custom get-session shaping and optional multi-session list mutation.

Device authorization

Supported

Device/user codes, polling, slow-down, approval, denial, token exchange, and verification URI behavior.

Email OTP

Supported

Send, check, verify, sign-in, password-reset, change-email flows, attempts, storage modes, and rate limits.

Dub

Supported

Core 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

Supported

Server-side authorization proxy, origin override, and trusted deep-link cookie transfer.

Generic OAuth

Supported

Custom OAuth sign-in, callback, link flows, DB/cookie state, dynamic params, issuer checks, and token/userinfo exchange.

Have I Been Pwned

Supported

SHA-1 k-anonymity lookup and protected password routes.

JWT/JWKS

Supported

EdDSA default, RSA/ECDSA algorithms, JWKS publication, rotation helpers, remote verification, and set-auth-jwt.

Last login method

Supported

Email, SIWE, social, and generic OAuth cookie/user-field updates.

Magic link

Supported

Send/verify, redirects/errors, signup, latest-token verification, and token storage modes.

MCP

Supported

OAuth metadata, registration, authorization-code PKCE, token refresh, userinfo, JWKS, and helper challenge headers.

Multi-session

Supported

Device sessions, active switching, replacement, revocation, and sign-out cleanup.

OAuth proxy

Supported

Callback rewriting, encrypted cross-origin cookie forwarding, validation, and stateless state restoration.

OAuth provider

Supported

Metadata, registration, clients, consent, auth code, client credentials, tokens, introspection, revocation, userinfo, and logout.

OIDC provider

Supported

Discovery, prompt/max-age, registration, consent, token flows, userinfo, logout, and client-secret storage modes.

One tap

Supported

Google ID-token callback, account reuse/linking, disabled signup, and session cookies.

One-time token

Supported

Generate/verify, single-use, expiration, cookie behavior, storage modes, and set-ott.

OpenAPI

Supported

Generator support exists for metadata, route inventory, models, security, rich schemas, path/query parameters, plugin endpoints, and Scalar reference HTML.

Organization

Supported

Org/member CRUD, invitations, teams, roles, hooks, permissions, and schema migrations.

Passkey

Supported

WebAuthn registration/authentication, challenge cookies, credential management, and schema output.

Phone number

Supported

OTP send/verify, sign-in/sign-up, updates, reset password, attempt limits, and validation hooks.

SCIM

Supported

Token envelopes, Bearer middleware, metadata, user CRUD, provider management, mappings, filters, PATCH, and org enforcement.

SIWE

Supported

Nonce, wallet sign-in, ENS hook, account/session creation, EIP-55 casing, and multi-chain wallets.

SSO

Supported

OIDC and SAML provider lifecycle, sign-in/callbacks, domain verification, metadata, and SAML validation in better_auth-sso.

Stripe

Supported

Checkout, portal, webhooks, subscription state transitions, seats, trials, org subscriptions, and metadata helpers.

Two-factor

Supported

TOTP, OTP, backup codes, trusted devices, disable/recovery, and post-login verification.

Username

Supported

Username sign-up/sign-in, availability, normalization, validation, duplicates, and leak-prevention behavior.

Payments

Stripe

Supported

The Ruby payment plugin surface is Stripe only.

Other Upstream Plugins

Test Utils

Not supported

There is no public BetterAuth::Plugins.test_utils Ruby plugin yet. Ruby packages use local test helpers and direct auth.api calls.

Community Plugins

Not supported

The upstream community plugin page lists JavaScript ecosystem plugins and is not a Ruby support promise.

Agent Auth and i18n

Not supported

No 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:

On this page