{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Adds session and token-based user authentication to FastAPI applications using JWT, similar to Flask-Login's approach.","skillfed_tags":["authentication","jwt","session-management"],"use_cases":["Protect FastAPI routes with JWT bearer tokens, requiring users to authenticate before accessing sensitive endpoints.","Implement cookie-based login flows for traditional web applications served by FastAPI, with automatic HTTPOnly flag handling.","Build multi-user APIs where each request carries a user identity decoded from a signed token.","Add custom exception handling for unauthenticated requests, e.g., redirecting to a login page.","Manage token expiration policies per-request, e.g., short-lived access tokens with longer refresh windows."],"what_it_does":"FastAPI-Login provides a Flask-Login-like authentication layer for FastAPI, handling JWT token creation, validation, and user session management. It wraps FastAPI's OAuth2 security model to let you protect routes with a simple dependency injection pattern, supporting both header-based bearer tokens and cookie-based sessions. The core workflow is: define a user loader callback, create tokens on login, then use the LoginManager as a route dependency to enforce authentication.\n\nThe package depends on fastapi, pyjwt, and typing-extensions. It supports Python 3.8 through 3.13 and runs on any OS. You provide the user lookup logic (database, in-memory store, etc.) and the package handles token lifecycle\u2014encoding, decoding, expiration, and optional cookie management with HTTPOnly flags.","worth_installing":"Yes, if you need straightforward JWT or cookie-based authentication in FastAPI without building token logic from scratch. The low install friction, permissive license, and stable API make it a practical choice. However, note the aging maintenance status\u2014verify compatibility with your fastapi version and consider whether the package receives updates for security patches or breaking changes in its dependencies."},"id":"fastapi-login","links":{"html":"https://skillfed.io/packages/fastapi-login","md":"https://skillfed.io/packages/fastapi-login.md","pypi":"https://pypi.org/project/fastapi-login/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-12-14","license_spdx":null,"license_treatment":"permissive","name":"fastapi-login","python_support":"supports_current","summary":"Flask-Login like package for FastAPI"},"popularity":{"monthly_downloads":85141,"position":13946,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.10.3"}
