Open JulienPalard opened 2 years ago
3 important points to fix from source cde 1, @jwt_optional==>@@jwt_required(optional=True) 2, @jwt_required==>@jwt_required() 3, change jwt_identity take 2 pars:
def jwt_identity(jwt_header, jwt_payload):
identity = jwt_payload["sub"]
return User.query.filter_by(id=identity).one_or_none()
Quick fix is to use
Flask-JWT-Extended<4
in the requirements/prod.txt but maybe someone want to port flask-realworld-example-app to Flask-JWT-Extended 4?