Skip to content

Incompatible with cookie-session package #15

@inorganik

Description

@inorganik

If you are using the cookie-session package instead of express-session, the app works fine until you try to logout.

The logout method calls req.session.destroy() which doesn't exist in the other package, so you get

TypeError: req.session.destroy is not a function

Can we add a check or state that this package needs to be used with express-session? Something like:

if (typeof req.session.destroy === 'function') {
  ...
} else {
 req.session = null;
}

I can PR if you'd like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions