Skip to content

Commit

Permalink
#900 use token instead of auth if avaiable
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Feb 11, 2020
1 parent 38724fe commit 95ad6e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions www/js/WizardCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
Expand Down

0 comments on commit 95ad6e5

Please sign in to comment.