feat: logout by auth strategy + keycloak implementation
This commit is contained in:
1 parent
cda1f1e805
commit
062a0b7979
6 files changed
+87
-11
No files matched your search
@@ -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)
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user