session: false doesn't work
See original GitHub issueSession: 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})
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Session variables not working php - Stack Overflow
Apparently, your session_save_path(), for me it was /var/lib/php5/, needs to have correct permissions (the user running php, eg www-data needs write access to ......
Read more >session_start - Manual - PHP
session_start() now returns false and no longer initializes $_SESSION when it failed to start the session. Examples ¶. A basic session example ¶....
Read more >Express session middleware
Forces a session that is “uninitialized” to be saved to the store. A session is uninitialized when it is new but not modified....
Read more >How to use sessions - Django documentation
By default, SESSION_EXPIRE_AT_BROWSER_CLOSE is set to False , which means session cookies will be stored in users' browsers for as long as SESSION_COOKIE_AGE...
Read more >Unable to use session state server because this version of ...
The session cache continues to work properly until the next application ... ="false"/> is set at the application level web.config, IIS will not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 inpassport.authenticate('local', { session: false })