Integrating with Python Flask API
Using authaction-python-sdk
Section titled “Using authaction-python-sdk”pip install "authaction-python-sdk[flask]"from authaction import AuthActionfrom authaction.flask import make_require_auth
aa = AuthAction(domain=os.getenv("AUTHACTION_DOMAIN"), audience=os.getenv("AUTHACTION_AUDIENCE"))require_auth = make_require_auth(aa)
@app.get("/protected")@require_authdef protected(): from flask import g return {"sub": g.current_user["sub"]}Full SDK reference: github.com/authaction/authaction-python-sdk