This commit is contained in:
Jon Lambson 2017-08-25 16:32:12 -06:00
parent 45aa59706c
commit 9d379c759c
1 changed files with 7 additions and 4 deletions

View File

@ -126,11 +126,14 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
if (requiresLogin && !Auth.isLoggedIn()) { if (requiresLogin && !Auth.isLoggedIn()) {
event.preventDefault(); event.preventDefault();
console.log('asdfasdfasdfasdfasdfasdfasdfasdf', toState); console.log('stuff here ->', toState);
if (!angular.equals(toState.data.session, {})) {
var sess = toState.data.session.access_token;
console.log('WHERE', $rootScope.redirectedURL );
Auth.add(sess)
$state.go("app." + $rootScope.redirectedURL);
}
$state.go('splash-page', { 'toState': toState.name }); $state.go('splash-page', { 'toState': toState.name });
} else {
// Auth.get(Auth.session);
} }
}); });
}]); }]);