passport-local icon indicating copy to clipboard operation
passport-local copied to clipboard

session: false doesn't work

Open wzup opened this issue 8 years ago • 6 comments

Session: false is not working. Your docs say it should be specified in options. But that's not true. It doesn't work that way.

passport.use(new LocalStrategy({
    usernameField: 'email',
    passwordField: 'passwd',
    session: false
  },
  function(username, password, done) {
    // ...
  }
));

Either change docs of modify the code. Because it has to be like this, not in initial config

passport.authenticate('local', {session:false})

wzup avatar Jun 29 '17 17:06 wzup

Any progress on this running into this same problem?

marcellino-ornelas avatar Aug 23 '19 07:08 marcellino-ornelas

Same here

TeodorKolev avatar May 22 '20 13:05 TeodorKolev

Running into this issue as well, can this get some attention?

ritlew avatar Sep 24 '20 19:09 ritlew

The same problem here, it's causing 100s of unwanted sessions between backend APIs, please help! @jaredhanson

TiruvedulaMithun avatar Feb 16 '21 13:02 TiruvedulaMithun

Same here. Looking in the source code I can't see anywhere where the session-option is actually used 🤔

https://github.com/jaredhanson/passport-local/blob/4d9fbefeba48164c43d5bde4e48ff57c2c37d372/lib/strategy.js#L42-L56

gunhaxxor avatar Jun 22 '21 13:06 gunhaxxor

Same here. Looking in the source code I can't see anywhere where the session-option is actually used 🤔

https://github.com/jaredhanson/passport-local/blob/4d9fbefeba48164c43d5bde4e48ff57c2c37d372/lib/strategy.js#L42-L56

Looks like a documentation error.

session: false option only works in passport.authenticate('local', { session: false })

MarvinXu avatar Dec 01 '22 11:12 MarvinXu