Refresh site on logout to avoid CSRF issues

This commit is contained in:
Agate 2020-05-19 12:02:58 +02:00
parent f4e9037f95
commit 79753d7752
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
1 changed files with 4 additions and 1 deletions

View File

@ -168,7 +168,10 @@ export default {
commit(`${m}/reset`, null, {root: true})
})
logger.default.info('Log out, goodbye!')
router.push({name: 'index'})
await router.push({name: 'index'}, () => {
// refresh to get a new CSRF token
window.location.reload(true)
})
},
async check ({commit, dispatch, state}) {
logger.default.info('Checking authentication…')