-
-
Notifications
You must be signed in to change notification settings - Fork 175
how use JWT_VERIFY_EXPIRATION #107
Comments
I also needed this feature and after taking a look I noticed that the |
This project has basically been abandoned it seems. Perhaps check out https://github.com/vimalloc/flask-jwt-extended instead (full disclosure, I'm the author). It can do (basically) unlimited length access tokens right out of the box, but it has a bunch of other built in goodies to make working in these situations more secure. In flask-jwt-extended, if you just need a token that lasts forever, you can set the http://flask-jwt-extended.readthedocs.io/en/latest/refresh_tokens.html You also have the option to enable token blacklisting, so if a single token gets compromised you can simply blacklist that one, instead of having to change your secret key and invalidate all of the tokens. There are of course trades offs to this, as you now need to keep state on your servers and it is no longer an entirely stateless implementation, hence it being completely optional. http://flask-jwt-extended.readthedocs.io/en/latest/blacklist_and_token_revoking.html Ok, done with the sales pitch. I hope that gave you some ideas to think about, and that whatever route you end up going works well for you! Cheers :) |
Does flask-jwt-extended have (or can it have) support for the ability to extend a token expiration based on recent usage? I'd love to have tokens expire after X amount of time, but renew is they are used within that period (without requiring the client to obtain and use a new token, ideally). |
my config is :
JWT_AUTH_URL_RULE = "/api/v1/auth"
JWT_VERIFY_EXPIRATION = False
I use token for my mobile app. I want that my token never expired, but it doesn't work.
Do you have an idea ?
The text was updated successfully, but these errors were encountered: