connect-mongodb-session
connect-mongodb-session copied to clipboard
on session destroy add a callback function
I want to trigger a event as soon a session is destroyed, something like this:
var store = new MongoStore()
store.on('destroy', function (sess) {
// react to your store destroying a session
})
app.use(expressSession({ store: store }))
Is this supported?
Not currently supported, but PRs are welcome.
you should rather have a callback or trigger an event where/when you do req.session.destroy()