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.
If you are using the
cookie-sessionpackage instead ofexpress-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 getCan we add a check or state that this package needs to be used with
express-session? Something like:I can PR if you'd like.