If the user does not log out manually, such as closing the browser, how do you know in Redis which user logged out? ?

  node.js, question

The server is NodeJs, which uses redis to store the session. How do you know in Redis at this time, which user has logged out? ?

Redis session key settingsexpireExpiration time, such as 1 hour, the user refreshes the page, and this expiration time is also refreshed (session component update expire each time); If the user does not act, the user will log out after the session expires in 1 hour.