How to extend token expiring time if user is not active for a set period using JWT?
<p><strong>Given an example here for a normal web app.</strong> </p>

<p>Traditionally, we use session and set timeout = 30 minutes. if session expires we will redirect user to login.  (Expired time will be extended when user/browser interact with web app)</p>

<p><strong>Using JWT, how to achieve that?</strong></p>

<p>I know something about "token refresh", when short-time token expires it will refresh a new one using refresh-token. </p>

<p>But it looks like it don't care about whether user is interacting with web app or not. So as long as refresh-token is alive, the browser can always get a new short-life JWT. </p>

<p>So the question is: How to extend token expiring time <strong>if user is not active for a set period</strong> using JWT?</p>