Open Googool opened 2 years ago
This error can be fixed by replacing the following
router.get('/logout', (req, res) => { if(req.user) { req.logout(); res.redirect('/'); } else { res.redirect('/'); } });
With this
router.get('/logout', (req, res) => { if(req.user) { req.session.destroy(); res.redirect('/'); } else { res.redirect('/'); } });
Hope this will help someone :-)
Thanks brother it worked
worked for me too😁 thanks
This error can be fixed by replacing the following
With this
Hope this will help someone :-)