still trying
This commit is contained in:
parent
c12c644188
commit
b70aee0abb
|
@ -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 });
|
||||
}
|
||||
});
|
||||
}]);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue