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

Incompatible with cookie-session package #15

Open
inorganik opened this issue Nov 26, 2019 · 1 comment
Open

Incompatible with cookie-session package #15

inorganik opened this issue Nov 26, 2019 · 1 comment

Comments

@inorganik
Copy link
Contributor

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.

@EternalDeiwos
Copy link
Contributor

EternalDeiwos commented Jan 27, 2020

@inorganik we're looking at reworking the storage and session use soon. We'll keep cookie-session in mind when we do. Stand by for progress!

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

2 participants