merge with master
This commit is contained in:
parent
b41f0624b8
commit
fc3f6c5403
|
@ -1,5 +1,8 @@
|
|||
app.factory('Auth', ['localStorageService', '$location', '$rootScope', function(localStorageService, $location, $rootScope) {
|
||||
app.factory('Auth', [
|
||||
'$rootScope', 'localStorageService', '$location', 'azp@oauth3.org'
|
||||
, function($rootScope, localStorageService, $location, Oauth3) {
|
||||
var user;
|
||||
|
||||
return {
|
||||
setUser: function(currentUser){
|
||||
user = currentUser;
|
||||
|
@ -8,8 +11,10 @@ app.factory('Auth', ['localStorageService', '$location', '$rootScope', function(
|
|||
} else {
|
||||
$location.path('/' + redirectedURL);
|
||||
}
|
||||
user = localStorageService.set('userAuth', JSON.stringify(currentUser));
|
||||
},
|
||||
isLoggedIn: function(){
|
||||
// TODO check sessions instead
|
||||
user = JSON.parse(localStorageService.get('userAuth'));
|
||||
return (user) ? user : false;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue