ezAuth Documentation

A multi-tenant authentication platform with email/password, magic links, OAuth, bot auth, custom data tables, and S3 object storage.

What is ezAuth?

ezAuth is a self-hosted authentication and user management service built with FastAPI and PostgreSQL. It provides everything you need to add auth to your applications:

Architecture

ezAuth follows a multi-tenant architecture with two levels of hierarchy:

Each application gets two API keys:

SDK Libraries

JavaScript

Zero-dep client for Node.js 18+ and all modern browsers. ESM, CJS, and IIFE builds.

Python

Sync client built on httpx. Python 3.11+. Frontend auth & backend admin.

Swift

Zero-dep async/await client using Foundation URLSession. iOS 15+, macOS 12+.

Kotlin

OkHttp + kotlinx.serialization + coroutines. JVM 17+ and Android.

Python Server SDK

FastAPI/Starlette middleware for verifying ezAuth JWTs in your backend.

CLI

Command-line tool for sign up, login, and full admin management.

Security Features

FeatureDetails
JWT signingRS256 with per-app RSA key pairs
Password hashingArgon2id with automatic rehashing on parameter changes
Token storageAll tokens (refresh, verification, magic link) stored as SHA-256 hashes
Token consumptionAtomic single-query UPDATE to prevent race conditions
Proof-of-workArgon2id-based hashcash to deter automated signups
Rate limitingRedis-backed per-IP and per-email rate limits
CORSPer-app allowed origins, no wildcard with credentials
Cookie securityHttpOnly, Secure, SameSite=Lax