still trying

This commit is contained in:
Jon Lambson 2017-08-28 14:32:52 -06:00
parent c12c644188
commit b70aee0abb
2 changed files with 4 additions and 4 deletions

View File

@ -129,13 +129,13 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
console.log('stuff here ->', toState);
if (!angular.equals(toState.data.session, {})) {
if ('access_token' in urlParams && 'refresh_token' in urlParams && 'issuer' in urlParams && 'audience' in urlParams) {
Auth.add(urlParams)
Auth.add(urlParams);
console.log('CURRENT SESSION IS: ',Auth.sessions);
}
}
console.log('WHERE', $rootScope.redirectedURL );
// $state.go('splash-page', { 'toState': toState.name });
$state.go('splash-page', { 'toState': toState.name });
}
});
}]);

View File

@ -22,6 +22,7 @@ app.factory('Auth', [
return Auth.sessions || false;
}
, add: function (session) {
console.log('what ya adding');
console.log(session);
var obj = JSON.parse(localStorage.getItem(dapSessions) || 'null') || {};
var dapName = 'dap-' + session.subject + '|' + session.issuer;
@ -70,7 +71,7 @@ app.factory('Auth', [
return Auth.session;
}
, get: function (session) {
console.log('mother fucking');
console.log('session:::::::');
console.log(session);
if (!session) {
return $q.resolve(null);
@ -81,7 +82,6 @@ app.factory('Auth', [
}
var name = session.token.sub + '@' + session.token.iss;
console.log('NAME', name);
var promise;
var sess;