Skip to main content

Convex Auth

Convex Auth is a library for implementing authentication directly within your Convex backend. This allows you to authenticate users without needing an authentication service or even a hosting server. Convex Auth currently supports client-side React web apps served from a CDN and React Native mobile apps.

Example: Live Demo (Source)

Convex Auth is in beta

Convex Auth is currently a beta feature. If you have feedback or feature requests, let us know on Discord!

Support for authentication in Next.js server components, API routes, middleware, SSR etc. is under active development. If you'd like to help test this experimental support please let us know how it goes in Discord.

Get Started

To start a new project from scratch with Convex and Convex Auth, run:

npm create convex@latest

and choose React (Vite) and Convex Auth.


To add Convex Auth to an existing project, follow the full setup guide.

Overview

Convex Auth enables you to implement the following authentication methods:

  1. Magic Links & OTPs - send a link or code via email
  2. OAuth - sign in with Github / Google / Apple etc.
  3. Passwords - including password reset flow and optional email verification

The library doesn't come with UI components, but you can copy code from the docs and example repo to quickly build a UI in React.

Learn more in the Convex Auth docs.