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

How to access Session.isNew? #27

Closed
GuyPaddock opened this issue Nov 16, 2014 · 1 comment
Closed

How to access Session.isNew? #27

GuyPaddock opened this issue Nov 16, 2014 · 1 comment
Assignees
Labels

Comments

@GuyPaddock
Copy link

The docs say that Session.isNew is "true" when the session is new. I've tried all of the following:

var session = require('cookie-session');
...
app.use(session({
    keys: ['key1', 'key2']
  }));

app.use(function (req, res, next) {
  var isNew = Session.isNew; // ReferenceError: Session is not defined
  var isNew = session.isNew; // undefined
  var isNew = req.session.isNew; // undefined
...
}

Where do I find this elusive isNew flag?

@dougwilson
Copy link
Contributor

Thanks! It looks like it's an error in the docs, as I don't believe this property has ever existed in this module.

@dougwilson dougwilson self-assigned this Jul 2, 2015
@expressjs expressjs locked and limited conversation to collaborators Jul 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants