clean up
This commit is contained in:
parent
69a6783e44
commit
072af04a4d
16
js/app.js
16
js/app.js
|
@ -126,17 +126,15 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
|
|||
// }
|
||||
if (requiresLogin && !Auth.isLoggedIn()) {
|
||||
event.preventDefault();
|
||||
toState.data.session.token = OAUTH3.jwt.decode(query.access_token);
|
||||
toState.data.session.refresh = OAUTH3.jwt.decode(query.refresh_token);
|
||||
if (!angular.equals(toState.data.session, {})) {
|
||||
// if ('access_token' in urlParams && 'refresh_token' in urlParams && 'issuer' in urlParams && 'audience' in urlParams) {
|
||||
Auth.add(query);
|
||||
console.log('go here', $rootScope.redirectedURL);
|
||||
$state.go('app.'+$rootScope.redirectedURL)
|
||||
// $location.path($rootScope.redirectedURL);
|
||||
// }
|
||||
toState.data.session.token = OAUTH3.jwt.decode(query.access_token);
|
||||
toState.data.session.refresh = OAUTH3.jwt.decode(query.refresh_token);
|
||||
Auth.add(query);
|
||||
console.log('go here', $rootScope.redirectedURL);
|
||||
$state.go('app.' + $rootScope.redirectedURL);
|
||||
} else {
|
||||
$state.go('splash-page', { 'toState': toState.name });
|
||||
}
|
||||
// $state.go('splash-page', { 'toState': toState.name });
|
||||
}
|
||||
});
|
||||
}]);
|
||||
|
|
Loading…
Reference in New Issue