0

This is my app session configuration:

app.use(session({
    store: new redisStore({
        host: 'localhost',
        port: 6379,
        client: redisClient,
    }),
    secret: 'this is secret',
    resave: false,
    saveUninitialized: true,
    rolling: true,
    maxAge: 3600000,
    cookie: {maxAge: 3600000} // 1 hour in ms
}));

I want to reset the session after user inactivity for one hour, but currently all the session data destroys event if user is active and makes request to the server.

How to reset maxAge by user activity?

Ali Sherafat
  • 3,506
  • 2
  • 38
  • 51

0 Answers0