v1 is live · on npm
Email and password authentication for your app
Sign-up, sign-in, email verification, password reset and optional two-factor, with a handful of components. Your secret key stays on your server, and the session cookie is first-party on your own domain.
npm install @authflowkit/sdk @authflowkit/uiA preview of the SignIn component, with its two-factor step behind it.
Works with
- Next.js
- Astro
- Express
- Vite
- React
What you get
Everything sign-in needs
The parts every app needs before it can have users, built once and covered by tests.
Sign-up and sign-in
Email and password, with prebuilt components for both.
Email verification
Users confirm their address before they can sign in.
Password reset
Single-use emailed links. Using one signs out every session.
Two-factor authentication
Optional authenticator-app codes, with recovery codes.
First-party sessions
An httpOnly cookie on your own domain, set through your server.
Rate limiting
On every credential route, with nothing to configure.
How it works
Your secret key never reaches a browser
Browser
Your server
AuthFlow API
Session cookie comes back first-party, on your domain
Quickstart
Up and running in three steps
The shape of it. The quickstart has the rest: two environment variables, the provider, and the pages your emails link to.
Install
npm install @authflowkit/sdk @authflowkit/uiAdd one route
// app/api/authflow/[...authflow]/route.ts import { createAuthFlowHandler } from "@authflowkit/sdk/server"; export const { GET, POST } = createAuthFlowHandler();Next.js shown. Astro, Express, Vite and React are in the quickstart.
Drop in a component
// app/sign-in/page.tsx "use client"; import { SignIn } from "@authflowkit/ui"; export default function SignInPage() { return <SignIn redirectTo="/dashboard" />; }
Components
Components that look right in light and dark
Every colour pair is contrast-checked in both themes. Pick one, or let your visitors choose.
Light
Dark
Live preview — type in it, press the buttons. Nothing is sent anywhere.
Secure by default
- Hashed passwords and keys
- Encrypted two-factor secrets
- No account enumeration
- Redacted logs
Start with one secret key
Create an account, create an app, and copy its key. The quickstart takes it from there.