diff --git a/res/app/menu/menu-controller.js b/res/app/menu/menu-controller.js index 82fac7e0cf..62ccd7e0e0 100644 --- a/res/app/menu/menu-controller.js +++ b/res/app/menu/menu-controller.js @@ -1,5 +1,5 @@ /** -* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0 +* Copyright © 2019-2023 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0 **/ module.exports = function MenuCtrl( @@ -37,9 +37,12 @@ module.exports = function MenuCtrl( }) $scope.logout = function() { - $cookies.remove('XSRF-TOKEN', {path: '/'}) - $cookies.remove('ssid', {path: '/'}) - $cookies.remove('ssid.sig', {path: '/'}) + const cookies = $cookies.getAll() + for (const key in cookies) { + if (cookies.hasOwnProperty(key)) { + $cookies.remove(key, {path: '/'}) + } + } $window.location = '/' setTimeout(function() { socket.disconnect()