Install & Compatibility
Where this runs
tested against v1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.1s · import 0.000s · 29MB
27MB installed
● package 27MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AWSCognitoAuthentication
✓ from flask_awscognito import AWSCognitoAuthentication
✗ from flask_awscognito import AWSCognitoAuthentication
Basic Flask app with Cognito login using AWSCognitoAuthentication.
from flask import Flask, jsonify
from flask_awscognito import AWSCognitoAuthentication
app = Flask(__name__)
app.config['AWS_DEFAULT_REGION'] = 'us-east-1'
app.config['AWS_COGNITO_DOMAIN'] = 'https://your-domain.auth.us-east-1.amazoncognito.com'
app.config['AWS_COGNITO_USER_POOL_ID'] = 'us-east-1_xxxxxxxxx'
app.config['AWS_COGNITO_CLIENT_ID'] = 'xxxxxxxxxxxxxxxxxxxxxxxxx'
app.config['AWS_COGNITO_CLIENT_SECRET'] = os.environ.get('CLIENT_SECRET', '')
app.config['AWS_COGNITO_REDIRECT_URL'] = 'https://localhost:5000/aws_cognito/redirect'
aws_auth = AWSCognitoAuthentication(app)
@app.route('/login')
def login():
return aws_auth.sign_in()
@app.route('/callback')
def callback():
access_token = aws_auth.get_access_token(request.args)
return jsonify({'token': access_token})
if __name__ == '__main__':
app.run(ssl_context='adhoc')
Upgrade
Version history
1.3latest on PyPI · released Dec 16, 2019
Audit
Dependencies
flaskrequiredRequired Flask extension.
flask-loginrequiredRequired for user session management.
pycognitorequiredUnderlying AWS Cognito client.