Skip to content

Instantly share code, notes, and snippets.

@nikshinde-7
Created January 12, 2022 10:14
Show Gist options
  • Save nikshinde-7/2447390c054b579ec6c86c2fe076d208 to your computer and use it in GitHub Desktop.
Save nikshinde-7/2447390c054b579ec6c86c2fe076d208 to your computer and use it in GitHub Desktop.
// To destroy the session we use this endpoint
router.get('/logout', (req, res) => {
req.logout();
req.session.destroy();
res.redirect(process.env.BASEURL);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment