Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/get-convex/better-auth/llms.txt

Use this file to discover all available pages before exploring further.

Convex + Better Auth is a Convex Component that provides a seamless integration layer between Better Auth and Convex. Get powerful, flexible authentication into your Convex app in minutes.

Quick Start

Get authentication running in your Convex app in minutes

Framework Guides

Step-by-step setup for React, Next.js, TanStack Start, SvelteKit, and Expo

API Reference

Explore the full API — component client, plugins, and type utilities

Supported Plugins

Browse supported Better Auth plugins: 2FA, magic link, OTP, and more

What you get

Email & Password

Built-in email and password authentication with session and account management

Social Sign-On

Sign in with GitHub, Google, Discord, Twitter, and many more OAuth providers

Two-Factor Auth

Secure accounts with TOTP-based two-factor authentication using a few lines of code

Transactional Triggers

Run Convex mutations in the same transaction as auth events — onCreate, onUpdate, onDelete

Framework Support

Works with React (Vite), Next.js, TanStack Start, SvelteKit, and Expo (React Native)

Full Schema Control

Use Local Install to own your auth schema and access all Better Auth plugins

Get started

1

Create a Convex project

If you don’t have one already, run npm create convex@latest to scaffold a new Convex project.
2

Install the component

Install @convex-dev/better-auth and a pinned version of better-auth.
npm install convex@latest @convex-dev/better-auth
npm install better-auth@1.5.3 --save-exact
3

Choose your framework

Follow the guide for your framework to complete installation and configuration.

React (Vite)

Next.js

TanStack Start

SvelteKit

4

Add authentication to your UI

Use authClient.signIn.* and authClient.signUp.* methods from Better Auth’s client, and wrap your app with ConvexBetterAuthProvider.
This component requires Convex 1.25.0 or later and Better Auth 1.5.x. See the quickstart for a complete walkthrough.