feat: logout by auth strategy + keycloak implementation

This commit is contained in:
NGPixel
2020-09-01 20:01:25 -04:00
parent cda1f1e805
commit 062a0b7979
6 changed files with 87 additions and 11 deletions

View File

@@ -109,10 +109,11 @@ router.post('/login', bruteforce.prevent, async (req, res, next) => {
/**
* Logout
*/
router.get('/logout', function (req, res) {
router.get('/logout', async (req, res) => {
const redirURL = await WIKI.models.users.logout({ req, res })
req.logout()
res.clearCookie('jwt')
res.redirect('/')
res.redirect(redirURL)
})
/**