miguelgrinberg / REST-auth

Example application for my RESTful Authentication with Flask article.
http://blog.miguelgrinberg.com/post/restful-authentication-with-flask
MIT License
921 stars 337 forks source link

How to delay token? #11

Closed zqtlin closed 6 years ago

zqtlin commented 6 years ago

How to automatically postpone the token after receiving the request?

miguelgrinberg commented 6 years ago

What do you mean by "postpone"?

zqtlin commented 6 years ago

When I received the request, the original token timestamp could be renewed. For example, the token time I set was half an hour. After 15 minutes, when I received the request, I updated the token timestamp and set it in half an hour before token failed.

miguelgrinberg commented 6 years ago

This type of token cannot be extended, if you want to give the client more time, then you need to generate a new token with the updated expiration time.

zqtlin commented 6 years ago

OK.Thanks for your reply!