diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-22 14:56:10 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-22 14:56:10 -0400 |
| commit | 00c98cae610c0985c69b3b7bdb078cfbd354df0a (patch) | |
| tree | 5f94b7077dc0ad29ccc02f27d04721567b5fc172 /www/js/WizardCtrl.js | |
| parent | ff613f8e6210d2c4cd2f8deacc0096e18aff2fcd (diff) | |
clear cookies in desktop too
Diffstat (limited to 'www/js/WizardCtrl.js')
| -rw-r--r-- | www/js/WizardCtrl.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index fb76c64c..0852f4f6 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -2,7 +2,7 @@ /* jslint browser: true*/ /* global cordova,StatusBar,angular,console, Masonry, URI */ -angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$ionicPopup', 'SecuredPopups', '$http', '$q', 'zm', '$ionicLoading', 'WizardHandler', '$translate', function ($scope, $rootScope, $ionicModal, NVRDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $ionicPopup, SecuredPopups, $http, $q, zm, $ionicLoading, WizardHandler, $translate) { +angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVRDataModel', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$ionicPopup', 'SecuredPopups', '$http', '$q', 'zm', '$ionicLoading', 'WizardHandler', '$translate', '$cookies', function ($scope, $rootScope, $ionicModal, NVRDataModel, $ionicSideMenuDelegate, $ionicHistory, $state, $ionicPopup, SecuredPopups, $http, $q, zm, $ionicLoading, WizardHandler, $translate, $cookies) { $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); }; @@ -342,19 +342,25 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ function logout(u) { var d = $q.defer(); - + NVRDataModel.debug ("Clearing cookies"); if (window.cordova) { // we need to do this or ZM will send same auth hash // this was fixed in a PR dated Oct 18 - NVRDataModel.debug ("Clearing cookies"); - cordova.plugin.http.clearCookies(); + + cordova.plugin.http.clearCookies(); + } + else { + angular.forEach($cookies, function (v, k) { + $cookies.remove(k); + }); + } if ($scope.wizard.useauth && $scope.wizard.usebasicauth) { NVRDataModel.debug ("setting basic auth"); cordova.plugin.http.useBasicAuth($scope.wizard.basicuser, $scope.wizard.basicpassword); } - } + $http({ |
