clean up
This commit is contained in:
		
							parent
							
								
									69a6783e44
								
							
						
					
					
						commit
						072af04a4d
					
				
							
								
								
									
										10
									
								
								js/app.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								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(); | ||||||
|  |       if (!angular.equals(toState.data.session, {})) { | ||||||
|         toState.data.session.token = OAUTH3.jwt.decode(query.access_token); |         toState.data.session.token = OAUTH3.jwt.decode(query.access_token); | ||||||
|         toState.data.session.refresh = OAUTH3.jwt.decode(query.refresh_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); |         Auth.add(query); | ||||||
|         console.log('go here', $rootScope.redirectedURL); |         console.log('go here', $rootScope.redirectedURL); | ||||||
|           $state.go('app.'+$rootScope.redirectedURL) |         $state.go('app.' + $rootScope.redirectedURL); | ||||||
|           // $location.path($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