Added Social Authentication + fixed Agent Cron
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
@@ -1,6 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = (socket) => {
|
||||
|
||||
console.log(socket.request.user);
|
||||
|
||||
//-----------------------------------------
|
||||
// SEARCH
|
||||
|
Reference in New Issue
Block a user