I own a stateless architecture, exchanging a JWT token between client and server at authentication time.
I want to store in database (once per day) a timestamp related to the user access.
Indeed, I would like to be able to show who was accessing the app, with a margin of 1 day (kind of rather online users).
A good solution (to avoid hitting database at each client request) I guessed would be to add a property to the JWT token called
recentUserAccessTimestamp and to send it to the client at every request.
Question is: Is it a good practice to make the client replace its existing token (in LocalStorage for instance in case of WebApp) right after each request on my server?