{"categories":[{"label":"Security","url":"https://skillfed.io/packages/category/security/3"}],"enrichment":{"capability":"Decodes, validates, and parses AWS Cognito JWT tokens in FastAPI applications, supporting both HTTP and WebSocket authentication without handling sign-up or sign-in.","skillfed_tags":["aws-cognito","jwt-auth","fastapi-middleware"],"use_cases":["Protect FastAPI endpoints with Cognito JWT tokens, extracting user identity and claims for authorization logic.","Support optional authentication on public endpoints that may also serve authenticated users with different responses.","Validate tokens from multiple Cognito userpools in a single application, routing by userpool name.","Extend token validation with custom token models to parse application-specific claims beyond standard Cognito fields.","Secure WebSocket connections by validating Cognito tokens during the handshake.","Use custom JWKS URLs for local development with cognito-local or other Cognito-compatible identity providers."],"what_it_does":"fastapi-cognito is a FastAPI middleware library that integrates AWS Cognito JWT authentication into your application. It handles the mechanics of fetching Cognito's public keys, validating token signatures, checking expiration, and parsing token claims\u2014letting you protect endpoints with a simple dependency injection pattern. The library supports multiple Cognito userpools, optional authentication, custom token models for extended claims, and both HTTP and WebSocket connections.\n\nYou configure it by providing your Cognito region, userpool ID, and app client ID (either in code, YAML, or JSON), then use it as a FastAPI dependency on any route. It does not handle user sign-up or sign-in; it assumes tokens are issued by Cognito and focuses entirely on validation and parsing. The package relies on fastapi, pydantic, pyyaml, aiofile, async-lru, joserfc, and httpx to manage async I/O, settings, and cryptographic verification.","worth_installing":"Yes, if you are building a FastAPI application backed by AWS Cognito and need straightforward JWT validation. The library is permissively licensed, has low install friction, and supports modern Python versions. However, maintenance is aging (last commit 495 days ago), so evaluate whether the package's feature set meets your needs and whether you are comfortable with slower response to issues. No known security vulnerabilities as of the query date."},"id":"fastapi-cognito","links":{"html":"https://skillfed.io/packages/fastapi-cognito","md":"https://skillfed.io/packages/fastapi-cognito.md","pypi":"https://pypi.org/project/fastapi-cognito/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-04-06","license_spdx":null,"license_treatment":"permissive","name":"fastapi-cognito","python_support":"supports_current","summary":"AWS Cognito JWT authentication library for FastAPI"},"popularity":{"monthly_downloads":85409,"position":13924,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.9.0"}
