diff --git a/controllers/login.js b/controllers/login.js index 7c6dd1ce05..45285445fe 100644 --- a/controllers/login.js +++ b/controllers/login.js @@ -468,6 +468,13 @@ router.get('/logout/', (req, res, next) => { .catch((err) => { logger.error('error during logout.', formatError(err)); }); + + api(req, { version: 'v3' }) + .del('/collaborative-text-editor/delete-sessions') // async, ignore result + .catch((err) => { + logger.error('can not delete etherpad client sessions', formatError(err)); + }); + return authHelper.clearCookie(req, res, sessionDestroyer) // eslint-disable-next-line prefer-template, no-return-assign .then(() => { diff --git a/helpers/authentication.js b/helpers/authentication.js index 27e8e8c81b..3e0b02e32b 100644 --- a/helpers/authentication.js +++ b/helpers/authentication.js @@ -64,6 +64,7 @@ const clearCookie = async (req, res, options = { destroySession: false }) => { }); }); } + res.clearCookie('jwt'); // this is deprecated and only used for cookie removal from now on, // and can be removed after one month (max cookie lifetime from life systems)