summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 +