--- id: flask-awscognito version: "1.3" license: MIT license_treatment: permissive maintenance: abandoned --- # Flask-AWSCognito — Authenticate users with AWS Cognito License: permissive · Maintenance: abandoned · Downloads: 80.5K/mo ## What it is and what it does Flask-AWSCognito is a Flask extension that wraps AWS Cognito authentication into decorators and helper methods. It handles the OAuth redirect flow with Cognito, retrieves and validates access tokens, and exposes user claims to route handlers. The package depends on Flask, python-jose for JWT validation, and requests for HTTP calls to Cognito endpoints. The extension is configured via Flask's app.config with your Cognito domain, user pool ID, and client credentials. Routes are protected with the @authentication_required decorator, which enforces that a valid token is present before the handler runs. Claims are then available as aws_auth.claims or via Flask's g object. However, the package has been abandoned since its last commit on 2021-04-29 and will not track changes to Flask, AWS Cognito's token formats, or its dependencies. Use it for: - Protect Flask routes with AWS Cognito user authentication without building OAuth redirect flow logic from scratch. - Extract and validate JWT claims from Cognito tokens to authorize requests based on user attributes. - Implement sign-in redirects and token exchange callbacks in a Flask app backed by a Cognito user pool. - Add role or group-based access control by inspecting Cognito claims in protected route handlers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates AWS Cognito user authentication into Flask applications, handling sign-in redirects, token retrieval, and request-level claim validation. No. The package is abandoned (last commit 2021-04-29) and will not receive updates for new Flask versions, modern dependency versions, or changes to AWS Cognito's token formats. For new projects, use a maintained alternative. For existing projects still on older Flask versions with frozen dependencies, it may work, but you assume all maintenance risk. ## Install pip install flask-awscognito uv add flask-awscognito poetry add flask-awscognito ## Installing Flask-AWSCognito Before you install: Low install friction with three common dependencies. However, the package is abandoned—last release was 2019-12-16 and last commit 2021-04-29—so it will not receive security updates or bug fixes for new Flask or dependency versions. License in practice: MIT license is permissive; you may use, modify, and distribute the package freely with minimal restrictions, though you must retain the license notice. Quickstart: pip install Flask-AWSCognito from flask import Flask from flask_awscognito import AWSCognitoAuthentication app = Flask(__name__) app.config['AWS_DEFAULT_REGION'] = 'eu-west-1' app.config['AWS_COGNITO_USER_POOL_ID'] = 'eu-west-1_XXX' app.config['AWS_COGNITO_USER_POOL_CLIENT_ID'] = 'YYY' aws_auth = AWSCognitoAuthentication(app) @app.route('/') @aws_auth.authentication_required def index(): return {'claims': aws_auth.claims} Requires AWS Cognito user pool credentials (region, pool ID, client ID, client secret) configured via Flask app.config. Verify before relying: - Whether the package works with recent Flask versions given its 2021 last commit date. - Current compatibility with modern python-jose and requests versions. - Whether JWT validation logic matches current AWS Cognito token formats and signing practices. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 80.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flask cognito authentication, aws cognito flask integration, cognito user pool flask, flask oauth cognito, cognito jwt flask decorator, authentication, aws-cognito, abandoned [View on SkillFed](https://skillfed.io/packages/flask-awscognito) · [View on PyPI](https://pypi.org/project/flask-awscognito/)