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()) {
 | 
					    if (requiresLogin && !Auth.isLoggedIn()) {
 | 
				
			||||||
      event.preventDefault();
 | 
					      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 (!angular.equals(toState.data.session, {})) {
 | 
				
			||||||
        // if ('access_token' in urlParams && 'refresh_token' in urlParams && 'issuer' in urlParams && 'audience' in urlParams) {
 | 
					        toState.data.session.token = OAUTH3.jwt.decode(query.access_token);
 | 
				
			||||||
          Auth.add(query);
 | 
					        toState.data.session.refresh = OAUTH3.jwt.decode(query.refresh_token);
 | 
				
			||||||
          console.log('go here', $rootScope.redirectedURL);
 | 
					        Auth.add(query);
 | 
				
			||||||
          $state.go('app.'+$rootScope.redirectedURL)
 | 
					        console.log('go here', $rootScope.redirectedURL);
 | 
				
			||||||
          // $location.path($rootScope.redirectedURL);
 | 
					        $state.go('app.' + $rootScope.redirectedURL);
 | 
				
			||||||
        // }
 | 
					      } else {
 | 
				
			||||||
 | 
					        $state.go('splash-page', { 'toState': toState.name });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // $state.go('splash-page', { 'toState': toState.name });
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}]);
 | 
					}]);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user