We're using JWT as our authentication and storing it as a cookie with HTTPONLY for security reasons. (https://stormpath.com/blog/where-to-store-your-jwts-cookies-vs-html5-web-storage). We're currently setting a maxAge on it for an hour and will be refreshing the maxAge time on subsequent api requests to prolong the active session (only if the JWT is not expired).
We need to handle the use case where on browser close the JWT Token is cleared from the cookie so that on a public machine, a re-opening of the browser would not re-instate the previous user's session. How is this possible?
Or what is the proper way to implement JWT for the use cases mentioned above?