summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-02-11 12:05:18 -0500
committerPliable Pixels <pliablepixels@gmail.com>2020-02-11 12:05:18 -0500
commit95ad6e560b7ed9e578420362d527f29a7f3c1488 (patch)
tree770ac3314e54025a9dfa16cc48be12055e19d176 /www/js
parent38724fe8719d35bc1b4a7e0bd371bfcb58debab7 (diff)
#900 use token instead of auth if avaiable
Diffstat (limited to 'www/js')
-rw-r--r--www/js/WizardCtrl.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js
index 726cc6f4..c017b03f 100644
--- a/www/js/WizardCtrl.js
+++ b/www/js/WizardCtrl.js
@@ -583,8 +583,12 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$
$ionicLoading.hide();
//$rootScope.loggedIntoZm = 1;
$rootScope.authSession = '';
-
- if (succ.credentials) {
+ if (succ.access_token) {
+ NVR.debug ('Got token, using it');
+ $rootScope.authSession = "&token=" + succ.access_token;
+ }
+ else if (succ.credentials) {
+ NVR.debug ('Got auth= not token, using it');
$rootScope.authSession = "&" + succ.credentials;
if (succ.append_password == '1') {
$rootScope.authSession = $rootScope.authSession +