Existing-backend companion
Add Better Auth UI to your React app.
BTST adds auth and account client routes, UI, and session-refresh wiring to an app that already operates its own Better Auth backend.
Best for
Teams already operating Better Auth that want its auth and account UI composed into the maintained BTST framework paths.
- Requires
- An existing Better Auth backend and browser client; The supported @btst/better-auth-ui and Better Auth package cohort
- External service boundary
- The adopter's existing Better Auth endpoint; BTST does not host it
- Ownership boundary
- Your application keeps the Better Auth server, database, providers, secrets, sessions, and deployment. The companion supplies client routes and UI; it does not create or host authentication.
BTST supplies
- Auth and account route definitions backed by @btst/better-auth-ui
- Sign-in, sign-up, recovery, account, security, and settings UI
- A CLI scaffold that creates one browser client for the existing auth endpoint
- Framework-native session refresh wiring for the maintained integration paths
You supply
- An existing Better Auth server, schema, migrations, providers, and secrets
- A Better Auth browser client configured for the adopter-owned endpoint
- Any optional Better Auth server and client plugins used by the application
- Deployment, session policy, and separate BTST authorization mapping when needed
You own and customize
Your application keeps the Better Auth server, database, providers, secrets, sessions, and deployment. The companion supplies client routes and UI; it does not create or host authentication.
Compatibility and dependencies
- Maintained integrations
- Next.js 15+ App Router · React Router v7 · TanStack Start
- Requires
- An existing Better Auth backend and browser client; The supported @btst/better-auth-ui and Better Auth package cohort
- External services
- The adopter's existing Better Auth endpoint; BTST does not host it
From registration to result
The shipped workflow
This is the feature path BTST supplies—not a claim that your app needs no integration work.
Operate Better Auth
Keep the existing server endpoint, schema, providers, secrets, and browser client.
Add the companion
Register auth and account client plugins in the BTST client stack.
Mount routes
Serve sign-in, recovery, account, security, and settings views under your site path.
Refresh sessions
Use the generated framework-native refresh seam after session changes.
Continue your task
Move from evaluation to the right implementation boundary.
Implementation guides
Work through a specific Better Auth UI integration task with examples and verification steps.
- Connect Better Auth UI to Next.js
Wire page routes, session refresh, and application permissions to an existing auth server.
- Manage and revoke browser sessions
Check account security controls and how session caching affects revoked access.
- Configure passkey sign-in
Connect server and browser plugins, then verify enrollment on the intended origin.
- Add organization settings and invitations
Connect organization pages, invitation delivery, and server-side membership rules.