I am using Passport js with Express js. In my application, I need a functionality that a user should be logged out from the server if he/she is idle for a certain time.
But the problem is it requires req
(request) object in order to logout a user. How can I logout a user without req
object.
Note: I am using cookie-session for the persistent session.
Thank you.