I just learned about flask and JWT like a week ago so I could really use some help. Can someone explain the difference between flask-jwt and flask-jwt-extended?
JSON Web Tokens (or JWTs) provide a means of transmitting information from the client to the server in a stateless, secure way. On the server, JWTs are generated by signing user information via a secret key, which are then securely stored on the client.
How do you increase JWT token expiration time in flask? Unfortunately we can't just change the expires time on a JWT on each request, as once a JWT is created it cannot be modified.
get_jwt_identity() → Any[source] In a protected endpoint, this will return the identity of the JWT that is accessing the endpoint. If no JWT is present due to jwt_required(optional=True) , None is returned. Returns. The identity of the JWT in the current request.
Flask-JWT does not have as many features, has made some silly design choices, and has been abandoned for years (look at how many open pull requests there are on the github page). Flask-JWT-Extended has more features, is better documented, and is still actively maintained. If you are looking for a JWT extension for Flask, you should absolutely use Flask-JWT-Extended over Flask-JWT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With