Added Social Authentication + fixed Agent Cron

This commit is contained in:
NGPixel
2016-10-30 18:41:10 -04:00
parent fa7391ea4b
commit dc6fc449f0
23 changed files with 428 additions and 111 deletions

View File

@@ -59,6 +59,18 @@ router.post('/login', bruteforce.prevent, function(req, res, next) {
})(req, res, next);
});
/**
* Social Login
*/
router.get('/login/ms', passport.authenticate('windowslive', { scope: ['wl.signin', 'wl.basic', 'wl.emails'] }));
router.get('/login/google', passport.authenticate('google', { scope: ['profile', 'email'] }));
router.get('/login/facebook', passport.authenticate('facebook', { scope: ['public_profile', 'email'] }));
router.get('/login/ms/callback', passport.authenticate('windowslive', { failureRedirect: '/login', successRedirect: '/' }));
router.get('/login/google/callback', passport.authenticate('google', { failureRedirect: '/login', successRedirect: '/' }));
router.get('/login/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/login', successRedirect: '/' }));
/**
* Logout
*/

View File

@@ -1,6 +1,8 @@
"use strict";
module.exports = (socket) => {
console.log(socket.request.user);
//-----------------------------------------
// SEARCH