diff --git a/ui/src/store/modules/user.js b/ui/src/store/modules/user.js index 6113f3ed9406..5c9dff69f960 100644 --- a/ui/src/store/modules/user.js +++ b/ui/src/store/modules/user.js @@ -472,9 +472,17 @@ const user = { }).catch(() => { resolve() }).finally(() => { + const paths = ['/', '/client'] + const hostname = window.location.hostname + const domains = [undefined, hostname, `.${hostname}`] Object.keys(Cookies.get()).forEach(cookieName => { - Cookies.remove(cookieName) - Cookies.remove(cookieName, { path: '/client' }) + paths.forEach(path => { + domains.forEach(domain => { + const options = { path } + if (domain) options.domain = domain + Cookies.remove(cookieName, options) + }) + }) }) }) })