Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Flask-JWT-Extended breaks compatibility #50

Open
JulienPalard opened this issue Oct 30, 2021 · 1 comment
Open

Flask-JWT-Extended breaks compatibility #50

JulienPalard opened this issue Oct 30, 2021 · 1 comment

Comments

@JulienPalard
Copy link

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?

@fly2099
Copy link

fly2099 commented Mar 27, 2022

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()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants