//POST middlewares
app.post(’/login’,(req,res)=>{
if(!Boolean(req.body.box))
req.session.cookie.maxAge=1
},
passport.authenticate(‘local’,{
successRedirect: ‘/home’,
failureRedirect: ‘/login’
})
)
//POST middlewares
app.post(’/login’,(req,res)=>{
if(!Boolean(req.body.box))
req.session.cookie.maxAge=1
},
passport.authenticate(‘local’,{
successRedirect: ‘/home’,
failureRedirect: ‘/login’
})
)