--- id: quart-auth version: "0.11.0" license: MIT license_treatment: permissive maintenance: dormant --- # quart-auth — A Quart extension to provide secure cookie authentication License: permissive · Maintenance: dormant · Downloads: 103.5K/mo ## What it is and what it does Quart-Auth is a session management extension for the Quart async web framework that handles user authentication via secure cookies. It provides decorators and utility functions to protect routes, log users in and out, and access the current user's authentication state throughout your application. The package integrates directly with Quart's initialization pattern and works with async route handlers. It stores session data in signed cookies, requiring only a secret key to be configured. You decorate routes with @login_required to enforce authentication, catch Unauthorized exceptions to redirect unauthenticated users, and use login_user() and logout_user() functions to manage sessions programmatically. Use it for: - Protect admin or user-only routes in a Quart web application by decorating them with @login_required. - Build a login form that calls login_user(AuthUser(id)) after credential verification to start a session. - Display user-specific content in templates by accessing the current_user global variable. - Implement a logout endpoint that calls logout_user() to end the current session. - Redirect unauthenticated users to a login page by catching the Unauthorized exception. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Quart-Auth provides session-based authentication for Quart web applications through secure cookie management, allowing you to protect routes, log users in and out, and track authentication state. Yes, if you are building a Quart application and need straightforward session-based authentication. The low install friction, permissive license, and support for current Python versions make it a reasonable choice. However, the 596-day gap since the last release signals dormancy; verify that the package meets your security and maintenance expectations before adopting it in a new project. ## Install pip install quart-auth uv add quart-auth poetry add quart-auth ## Installing quart-auth Before you install: Low install friction with only two runtime dependencies (quart and typing_extensions). The package is dormant—no release in 596 days—which may indicate limited active maintenance, though it does support current Python versions (3.9–3.13). License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use this package freely in most projects. Quickstart: pip install quart-auth from quart import Quart from quart_auth import QuartAuth, login_required app = Quart(__name__) app.secret_key = "your-secret-key" QuartAuth(app) @app.route("/protected") @login_required async def protected(): return "Authenticated" if __name__ == "__main__": app.run() Requires Quart to be installed and configured; you must set a secret key on the app before initializing QuartAuth. Verify before relying: - Whether the 596-day gap since last release indicates active maintenance or planned stability. - Security audit status and whether the package has undergone formal security review. - Real-world production usage patterns and any known limitations in session handling. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 103.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags quart session authentication, secure cookie management python, quart login decorator, async web app user authentication, quart user session management, protected routes quart, quart auth middleware, async-web, session-management, authentication [View on SkillFed](https://skillfed.io/packages/quart-auth) · [View on PyPI](https://pypi.org/project/quart-auth/)