Repository navigation
Add olauth - #3411
Open
kubdrabik wants to merge 1 commit into
Open
Add olauth#3411kubdrabik wants to merge 1 commit into
kubdrabik wants to merge 1 commit into
Conversation
Adds [olauth](https://github.com/kubdrabik/olauth) ([PyPI](https://pypi.org/project/olauth/)), a zero-config, one-line email/password authentication engine for Flask and FastAPI. ### Why it's awesome Setting up session-based email/password authentication in Flask or FastAPI typically requires wiring together multiple libraries, ORM models, session loaders, and templates (~150 lines of boilerplate). `olauth` reduces that setup to a single `olauth.init(app)` call—Ideal for hackathons, rapid MVPs, tutorials, and web apps: - Automatically provisions SQLite (WAL mode), PostgreSQL, or MySQL user and session tables. - Mounts `/signup`, `/login`, `/logout`, `/verify` (opt-in 6-digit email verification), `/forgot-password`, and `/reset-password` with responsive light/dark pages and optional custom Jinja2 template overrides. - Protects routes with `@olauth.login_required` (Flask) or `Depends(olauth.login_required)` (FastAPI) with built-in HTML redirect and JSON API content negotiation. - Production-minded security defaults (`bcrypt` with >72-byte SHA-256 pre-hashing, SHA-256 hashed session tokens in the database, `HttpOnly`/`SameSite=Lax` cookies, CSRF and open-redirect checks, and per-IP sliding-window rate limiting).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project
olauth (PyPI)
Checklist
Add project-name- [pypi-name](https://github.com/owner/repo) - Description ending with period.Which Tier
Pick one:
Explain:
In the
Authenticationsection, Django hasdjango-allauth("Authentication app for Django that 'just works'"), while Flask and FastAPI developers building session-based web apps, MVPs, tutorials, or hackathons have traditionally had to stitch together 150+ lines of boilerplate (Flask-Login+Flask-WTF+Flask-SQLAlchemy, or multi-fileFastAPI-Usersschemas/managers/transports) just to get email/password login and signup working.olauth(first published to PyPI in June 2026, now at stablev1.1.0) brings that same"just works"experience to both Flask and FastAPI in a singleolauth.init(app)call:/signup,/login,/logout,/verify(opt-in 6-digit email verification),/forgot-password, and/reset-passwordwith built-in responsive light/dark HTML pages and optional Jinja2 template overrides.@olauth.login_required(Flask) orDepends(olauth.login_required)(FastAPI) with automatic HTML redirect and JSON API content negotiation.bcryptwith >72-byte SHA-256 pre-hashing, SHA-256 hashed session tokens in the database,HttpOnly/SameSite=Laxcookies, CSRF and open-redirect validation, and per-IP sliding-window rate limiting).Displacement
N/A — the
Authenticationsection is below the 5-entry cap, so no existing entry needs to be displaced.