bradtraversy / storybooks

Node.js app with Google OAuth
MIT License
569 stars 891 forks source link

req.logout() Change in new version of passport #46

Open asgomda opened 2 years ago

asgomda commented 2 years ago

The logout route was previously:

router.get('/logout', (req, res, next) => { req.logout(); res.redirect('/') })

should be modified to:

router.get('/logout', (req, res, next) => { req.logout((error)=>{ if (error) {return next(error)} res.redirect('/') });
})