Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on session destroy add a callback function #29

Open
cookie-ag opened this issue Sep 7, 2016 · 2 comments
Open

on session destroy add a callback function #29

cookie-ag opened this issue Sep 7, 2016 · 2 comments

Comments

@cookie-ag
Copy link

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?

@vkarpov15
Copy link
Member

Not currently supported, but PRs are welcome.

@caub
Copy link

caub commented Oct 31, 2016

you should rather have a callback or trigger an event where/when you do req.session.destroy()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants