Add session authentication

This commit is contained in:
Kevin Thomas
2021-07-29 22:24:39 -07:00
parent 2439fc8813
commit a9adbdc856
5 changed files with 10 additions and 18 deletions

View File

@@ -39,14 +39,12 @@ module.exports = function () {
// serializing, and querying the user record by ID from the database when
// deserializing.
passport.serializeUser(function (user, cb) {
console.log('serializing user: ');
process.nextTick(function () {
cb(null, { id: user.id, username: user.username })
})
})
passport.deserializeUser(function (user, cb) {
console.log("DESERIALIZE")
process.nextTick(function () {
return cb(null, user)
})