From ff613f8e6210d2c4cd2f8deacc0096e18aff2fcd Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 22 Oct 2018 11:50:53 -0400 Subject: #725 move push handlers inside beforeEnter for better consistency --- www/js/WizardCtrl.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'www/js/WizardCtrl.js') diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index f4b3d456..fb76c64c 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -343,6 +343,20 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ function logout(u) { var d = $q.defer(); + 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(); + + if ($scope.wizard.useauth && $scope.wizard.usebasicauth) { + NVRDataModel.debug ("setting basic auth"); + cordova.plugin.http.useBasicAuth($scope.wizard.basicuser, $scope.wizard.basicpassword); + + } + } + + $http({ method: 'POST', url: u, -- cgit v1.2.3