expressjs / flash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the flash session not to be expired

alsemany opened this issue · comments

Hello,
I have this session

app.use(session({ secret: 'changeme' , cookie: { secure: false,  maxAge: new Date(Date.now() + 3600000), } , resave:false, saveUninitialized:false, store: new SkinStore(db)  }));

when using flash it will stuck on the session and not to be expired !
should I destory the flash session manually

I don't often use flash so I cannot help beyond this: maxAge should be an integer in milliseconds, not a date.
https://github.com/expressjs/session#cookiemaxage