AuthLoom¶
AuthLoom is a Python 3.12 or newer authentication library for FastAPI applications.
It provides email/password signup and signin, cookie-backed database sessions, current-user dependencies, password reset, password change, and email verification. AuthLoom is beta pre-release software; the beta series is for validating the public API, packaging, docs, and database integration before the first stable release.
Mental Model¶
AuthLoom owns authentication behavior and its database models: users, sessions, password-reset tokens, and email-verification tokens.
Your application owns the FastAPI app, database engine, async session factory, migrations, CSRF protection, email delivery, UI, deployment settings, and authorization rules for your own resources.
Prerequisites¶
You should already have, or be ready to add:
- Python 3.12 or newer.
- FastAPI.
- SQLAlchemy 2 with async sessions.
- One async database driver, such as
aiosqliteorasyncpg. - Alembic or another migration workflow.
Choose A Starting Path¶
- Existing app: follow the Consumer Integration Guide.
- Reference example: run
examples/credentials_authto see HTML forms, CSRF protection, migrations, and local email delivery in one small app.
Recommended Reading Order¶
- Consumer Integration - install, configure, migrate, mount routes, and test first authentication.
- Database and Migrations - make AuthLoom tables part of your application-owned migration history.
- Configuration - required setting first, then optional cookies, password policy, and hooks.
- Account Security Flows - password reset, password change, email verification, hooks, and CSRF boundaries.
- Security Model - security guarantees and application responsibilities.