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

MongoStore.destroy not removing the stored session #1

Open
benpusherhq opened this issue Jun 20, 2013 · 0 comments
Open

MongoStore.destroy not removing the stored session #1

benpusherhq opened this issue Jun 20, 2013 · 0 comments

Comments

@benpusherhq
Copy link

I unfortunately don't have a simple test case to recreate for this. In my application, req.session.destroy() was not removing the session data from the database (effectively disabling the "sign out" functionality).

I found it have something to do with the callback being passed to remove. Changing the code to pass a valid, but noop callback fixed the issue.

    destroy: function (sid, cb) {
        MongoStore.client.remove({ sid: sid }, cb || function(){});
    },

The associated versions of modules I'm using are:

  • express@3.2.6
  • mongoose@3.6.11
  • express-sessions@1.0.5

By the way, thanks for sharing this module!

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

1 participant