Skip to content

[NEW] OL-Auth - #380

Open
kubdrabik wants to merge 1 commit into
mjhea0:mainfrom
kubdrabik:patch-1
Open

kubdrabik wants to merge 1 commit into
mjhea0:mainfrom
kubdrabik:patch-1

Conversation

@kubdrabik

Copy link
Copy Markdown

⚠️ REQUIRED: This template MUST be filled out completely.

Pull requests that delete this template, leave sections blank, or ignore the requirements will be closed without review. We will not chase you for missing information -- please take the time to fill out all sections before submitting.

Project Information

  1. Project Name: OL-Auth (olauth)

  2. Project URL: https://github.com/kubdrabik/olauth (PyPI: https://pypi.org/project/olauth/)

  3. Description:

    Zero-config, one-line email/password authentication engine with session cookies, email verification, and password reset.


Criteria

Please answer the following questions about the project you are submitting. This will help us determine whether it should be included in the Awesome FastAPI list.

Note: If your project is less than one year old or has under 100 stars on GitHub, it may NOT meet the criteria for inclusion in the Awesome FastAPI list. We recommend that you promote your project more and then consider submitting it when it has gained more visibility and community support.

Read the Room: 👀 Before submitting, please take time to browse through the existing projects in the list. Get a sense of the quality, maturity, and types of projects we include. If your submission is primarily promotional or doesn't clearly benefit the broader FastAPI community, it's probably not a good fit. We're looking for projects that solve real problems and have demonstrated value to the ecosystem.

👉 Please read and fill out all five questions. We reserve the right to close your pull request without feedback if you skip one or all of them.

  1. Is the project new?

    • Yes
    • No
  2. How long has the project been maintained?

    ~0.5 years (first published to PyPI as 0.1.0a0 in June 2026, actively developed through the stable 1.0.0 and 1.1.0 releases in November 2026).

  3. How many releases has it had if it's a library or package?

    4 releases on PyPI (0.1.0a0, 0.1.0a1, 1.0.0, and 1.1.0): https://pypi.org/project/olauth/#history

  4. Are you the author, or are you submitting the project on behalf of a company?

    • I am the author
    • I am submitting on behalf of a company
    • Other (please specify)
  5. What makes it awesome?

    In the FastAPI ecosystem, packages like FastAPI-Users are awesome for large, customizable architectures, but they require wiring up multiple files of Pydantic schemas, async database adapters, user managers, and auth backends. Developers building hackathons, rapid MVPs, tutorials, or server-rendered FastAPI + Jinja2/HTMX apps frequently ask for a way to add simple cookie/session authentication without 150+ lines of boilerplate.

    olauth solves that gap in a single line (olauth.init(app)):

    • Auto-provisions user, session, and verification tables (zero-config SQLite in WAL mode locally, switching to PostgreSQL or MySQL via db= or OLAUTH_DATABASE_URL with automatic reconnect-on-drop).
    • Mounts /signup, /login, /logout, /verify (opt-in 6-digit email verification with console/SMTP/custom callback support), /forgot-password, and /reset-password.
    • Protects FastAPI routes natively via Depends(olauth.login_required) and Depends(olauth.current_user) with smart content negotiation (303 redirect to /login?next=... for browser Accept: text/html requests, 401 Unauthorized JSON for API clients).
    • Serves built-in responsive light/dark HTML pages out of the box, with easy template swapping (template_dir or per-page overrides).

AI Disclosure

We love transparent contributions. Using AI is perfectly fine, just let us know.

  • Yes, this pull request was generated or assisted by AI.
  • No, this pull request was authored entirely by a human.

Additional Information

  • Test Suite & CI: 36 unit and integration tests covering FastAPI and Flask engines, password hashing (bcrypt with >72-byte SHA-256 pre-hashing and constant-time dummy-hash checks), SHA-256 hashed session tokens at rest, open-redirect and Origin/Sec-Fetch-Site CSRF protections, sliding-window rate limiting, and SQLite/PostgreSQL/MySQL dialect handling.
  • Minimal Footprint: Only bcrypt and fastapi required (pip install "olauth[fastapi]").

Thank you for your submission!

Adds OL-Auth (olauth)
 (PyPI
), a zero-config, one-line email/password authentication engine for FastAPI (olauth.init(app) and Depends(olauth.login_required)) supporting SQLite/PostgreSQL/MySQL, persistent SHA-256 session cookies, 6-digit email verification, password reset, and swappable custom templates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant