Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a difference between flask-jwt and flask-jwt-extended?

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?

like image 639
Green Avatar asked Mar 12 '19 10:03

Green


People also ask

What is Flask JWT?

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?

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.

What is @jwt_required?

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.


1 Answers

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.

like image 65
vimalloc Avatar answered Sep 20 '22 15:09

vimalloc