Better Auth
Application authentication
git clone https://github.com/bijectionhq/better-auth.git
cd better-auth
git checkout 7236917e80c65d701019f05766f92feca7eaa806Bijection repository access is required. Request access.
Description
Application authentication
Explore the package README for API concepts, configuration, and examples. Check the Bijection source for adaptation-specific setup.
Review the source and its dependencies before adopting this package. Source availability does not establish npm publication or runtime qualification.
Getting started
- Get the source at the revision above and read its package documentation.
- Check the required Bijection SDK version, dependencies, and external service credentials.
- Follow the package setup instructions and the guide to using components.
- Exercise the component in your deployment according to your project’s verification rules.
Open source
Maintained source: bijectionhq/better-auth. Based on convex/better-auth. License: Apache-2.0. Consult the repository for license terms, notices, and contributor attribution.
From the upstream publisher
A Better Auth component for Convex.
Explore the demo ↗Upstream overview
From the upstream package documentation.
This component provides an integration layer for using Better Auth with Convex, enabling framework-agnostic authentication across React, Vue, Svelte, Next.js, and other popular frameworks. It handles email/password authentication, OAuth providers (GitHub, Google, Discord, Twitter), and multi-factor authentication while managing sessions and accounts through Convex's database.
Use cases
From the upstream package documentation.
- Building a multi-framework app where you need consistent authentication across React, Vue, Svelte, or other frontend frameworks using the same Convex backend
- Adding social login to your Convex app with support for GitHub, Google, Discord, Twitter, and other OAuth providers without managing provider-specific integration logic
- Implementing secure user accounts with email/password authentication, session management, and two-factor authentication using Convex for data persistence
- Migrating from another auth solution to Better Auth while keeping your existing Convex database schema and functions intact
- Building SSR applications with Next.js, Nuxt, or Astro that need server-side authentication handling integrated with your Convex backend
How it works
From the upstream package documentation.
The component acts as a bridge between Better Auth's authentication system and Convex's database and functions. Better Auth handles the authentication logic, session management, and OAuth provider integrations, while the component ensures all user data, sessions, and account information are stored and managed through your Convex backend.
The integration works by configuring Better Auth to use Convex functions for data persistence operations. When users sign up, sign in, or manage their accounts, Better Auth communicates with your Convex functions to store and retrieve user data, maintaining consistency with your existing Convex schema.
For multi-factor authentication and social sign-on, the component leverages Better Auth's built-in providers while ensuring all authentication state flows through Convex. This allows you to use Convex's real-time subscriptions and query capabilities with authenticated user data across any supported framework.
Upstream package FAQ
What authentication providers does Better Auth support with Convex?
The @convex-dev/better-auth component supports all authentication providers that Better Auth offers, including OAuth providers like Google, GitHub, and Discord, as well as email/password and magic link authentication. The component handles syncing user data from any provider to your Convex database.
How does session management work with Better Auth and Convex?
The @convex-dev/better-auth component automatically syncs Better Auth sessions with your Convex database. It provides utilities to access authenticated user data within Convex queries and mutations, maintaining session state consistency between the authentication layer and your database operations.
Can I customize user data storage when using Better Auth with Convex?
Yes, the @convex-dev/better-auth component allows you to define custom Convex schemas for user data while maintaining compatibility with Better Auth's authentication flow. You can extend user profiles with additional fields and relationships specific to your application needs.
Does Better Auth with Convex support server-side rendering?
The @convex-dev/better-auth component works with server-side rendering frameworks by providing utilities to validate sessions and access user data on the server. It integrates with Better Auth's SSR capabilities while maintaining access to Convex database operations.
Use with agents and CLI
Give your coding agent the component’s source identity and setup guidance.
Help me integrate Better Auth with Bijection.
Read: https://bijection.com/components/better-auth/SKILL.md
Check SDK compatibility and dependency availability.
Follow this project's execution and verification rules.Upstream README.md
View repository ↗Documentation from convex/better-auth, recorded October 23, 2026. APIs and setup may differ in the Bijection adaptation.
Use Better Auth with Convex.
Full documentation and guides: labs.convex.dev/better-auth
Framework Agnostic
Support for popular frameworks.
Supports popular frameworks, including React, Vue, Svelte, Astro, Solid, Next.js, Nuxt, Tanstack Start, Hono, and more.
Authentication
Email & Password Authentication.
Built-in support for email and password authentication, with session and account management features.
Social Sign-on
Support multiple OAuth providers.
Allow users to sign in with their accounts, including GitHub, Google, Discord, Twitter, and more.
Two Factor
Multi Factor Authentication.
Secure your users accounts with two factor authentication with a few lines of code.