set resave and saveUninitialized in express session
This commit is contained in:
parent
be18b060b5
commit
b0d88263c7
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ app.use((req, res, next) => { // custom logging middleware to log all incoming
|
||||||
});
|
});
|
||||||
|
|
||||||
// initialize passport
|
// initialize passport
|
||||||
app.use(session({ secret: 'cats' }));
|
app.use(session({ secret: 'cats', resave: false, saveUninitialized: false }));
|
||||||
app.use(passport.initialize());
|
app.use(passport.initialize());
|
||||||
app.use(passport.session());
|
app.use(passport.session());
|
||||||
passport.serializeUser(serializeSpeechUser); // takes the user id from the db and serializes it
|
passport.serializeUser(serializeSpeechUser); // takes the user id from the db and serializes it
|
||||||
|
|
Loading…
Reference in a new issue