Skip to content

Commit

Permalink
package.json modified
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedHassan07 committed Oct 10, 2016
1 parent 583dafa commit 5a334b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
"serve-favicon": "^2.3.0",
"standard-error": "^1.1.0",
"view-helpers": "latest",
"winston": "latest"
"winston": "latest",
"request": "2.75.0",
"qs": "6.2.1",
"passport-facebook-token": "3.3.0"
},
"devDependencies": {
"chai": "^3.2.0",
Expand Down
22 changes: 6 additions & 16 deletions public/js/controllers/users/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,32 @@ angular.module('mean.auth').controller('socialAuth', ['$scope', 'Global','$state
fbId: "102551953548872",
permissions: 'email,user_birthday',
fields: 'first_name,last_name,email,birthday,picture'
}).then(function (data) {
console.log(data);

}).then(function () {
SocialAuth.FbLogin(FB.getAuthResponse()).then(function (response) {
console.log(response);
if(response.status === 'success' || 200){
$window.location.href = '/';
}
});

}).catch(function () {
$window.location.reload();
})
}
};
$scope.twitterAuth = function(){
$auth.authenticate('twitter').then(function(response) {

if(response.status === 'success' || 200){
$window.location.href = '/';
}

// Signed in with Google.
})
}
});
};

$scope.googleAuth = function(){

$auth.authenticate('google').then(function(response) {

if(response.status === 'success' || 200){
$window.location.href = '/';
}

// Signed in with Google.
})
}
});
};


}]);
9 changes: 0 additions & 9 deletions public/js/services/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ angular.module('mean.auth').factory("SocialAuth", ['$http', function ($http) {
}
}
}]);



angular.module('mean.auth').service("TwitterAuth", ['$resource', function($resource) {
return $resource('/auth/twitter');
}]);
angular.module('mean.auth').service("GoogleAuth", ['$resource', function($resource) {
return $resource('/auth/google');
}]);
angular.module('mean.auth').service("SignOut", ['$resource', function($resource) {
return $resource('/signout');
}]);
Expand Down

0 comments on commit 5a334b3

Please sign in to comment.