From b0d88263c786c6e8e8b5598a7dc31625099997d4 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 18 Oct 2017 10:46:06 -0700 Subject: [PATCH] set resave and saveUninitialized in express session --- speech.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speech.js b/speech.js index 4b052fa1..470d0588 100644 --- a/speech.js +++ b/speech.js @@ -40,7 +40,7 @@ app.use((req, res, next) => { // custom logging middleware to log all incoming }); // initialize passport -app.use(session({ secret: 'cats' })); +app.use(session({ secret: 'cats', resave: false, saveUninitialized: false })); app.use(passport.initialize()); app.use(passport.session()); passport.serializeUser(serializeSpeechUser); // takes the user id from the db and serializes it