New Magic links and API keys

Sign-in that feels calm, and runs on your own server.

ZenAuth is a self-hostable OpenID Connect provider with passwords, social login, MFA, passkeys and a developer console.

  • Email and password
  • Google and GitHub
  • Passkeys
  • Magic links
  • Authenticator MFA
  • OpenID Connect
  • OAuth 2.0
  • PKCE
  • WebAuthn
  • TOTP
  • RS256
  • JWKS

Every way your users want to sign in

The pieces you would otherwise stitch together yourself, already wired up and sharing one account.

  • Passkeys with Touch ID, Windows Hello or a security key
  • Google and GitHub through one provider registry
  • MFA still enforced after a magic link

Ways to sign in

PasskeyBiometric or key
Magic linkOne use, 15 min
PasswordVerified email
AuthenticatorSecond factor

Users see what they approve

“Login with ZenAuth” shows which app is asking and what it will receive, before anything is shared.

  • Plain-language scopes
  • Your app name, logo and colour in emails
  • Sessions can be revoked at any time

Acme Notes wants to access your account

You can see exactly what will be shared.

Your nameprofile
Your email addressemail

Working sign-in in three steps

  1. 1

    Create an app

    Register it in the developer console and add your callback URLs.

    Developer console
  2. 2

    Connect with OIDC

    Point any OIDC library at the discovery URL with your client ID.

    /.well-known/openid-configuration
  3. 3

    Let users in

    Users sign in with any method and approve access on a consent screen.

    /o/authorize

Built on open standards

If your framework speaks OpenID Connect, it speaks ZenAuth.

  • Authorization Code flow with PKCE
  • Standard discovery document and JWKS
  • Rotating client secrets

providers.tsx

"use client";import {  ZenAuthProvider,  SignIn,  SignedIn,  SignedOut,  UserButton,} from "@zenauth/react"; export function Providers({ children }) {  return (    <ZenAuthProvider      clientId={process.env.NEXT_PUBLIC_ZENAUTH_CLIENT_ID!}      redirectUri="https://yourapp.com/auth/callback"      issuer="https://auth.example.com"    >      <SignedOut><SignIn returnTo="/dashboard" /></SignedOut>      <SignedIn><UserButton /></SignedIn>      {children}    </ZenAuthProvider>  );}

One console for your apps

Register applications, manage redirect URIs and branding, and create or revoke API keys.

  • Public and confidential clients
  • Per-application API keys that can expire and be revoked

Acme Notes

Client IDacme-notes-client
Redirect URIhttps://notes.example.com/callback
API keyca_live_••••••••
Scopesopenid profile email

Run it on your own server

One repository you can read end to end: an Express API, a Next.js dashboard, Postgres and Redis.

  • Docker Compose files for local and production
  • Your own RSA keys sign every token
  • A Caddy config and a deployment guide included
Terminal
# install and create your .envpnpm installbash setup.sh# Postgres and Redisdocker compose up -d# RSA keys that sign your tokensbash scripts/generate-keys.shpnpm db:migrate# API on :8000, dashboard on :3000pnpm dev

Security you can explain

Plain mechanics you can read in the source.

Hashed, never stored

Passwords are hashed with a modern, slow algorithm. We cannot read them, and neither can an attacker with a database dump.

Bot & abuse protection

Cloudflare Turnstile guards sign-up and sign-in, with rate limiting backed by Redis.

Phishing-resistant sign-in

Passkeys are bound to your domain, so a fake login page cannot capture them.

Short-lived sessions

Access tokens are short-lived and refresh tokens are rotated. Revoke any session from your dashboard.

Strict redirect rules

Registered redirect URIs and PKCE keep authorization codes from being intercepted or replayed.

You control your data

No selling, no ad targeting. Export or delete everything at any time.

How we handle security

Frequently asked questions

ZenAuth is an identity provider. You can plug it into NextAuth (or any OIDC library) as a provider, or later use our SDK directly.

Email + password, magic links, Google, GitHub, TOTP-based MFA and passkeys.

The project is a monorepo (API + web) backed by PostgreSQL and Redis, so you can run it on your own infrastructure.

Yes: @zenauth/react gives you <SignIn />, <UserButton /> and hooks, built on standard OIDC with PKCE. Any other stack can use plain OpenID Connect.

Create an account, open the Developer console, and register an application to get a client ID and secret.

Add sign-in to your app

Create a free account, register an application and point your OIDC library at it.