diff options
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | router.js | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/package.json b/package.json index 793d239..e218182 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "less-middleware": "*", "passport": "*", "passport-local": "*", + "passport-facebook": "*", "bcrypt": "*" } } @@ -1,10 +1,13 @@ var passport = require('passport') , LocalStrategy = require('passport-local').Strategy + , FacebookStrategy = require('passport-facebook').Strategy , mongodb = require('mongodb') , mongoose = require('mongoose') , bcrypt = require('bcrypt') , SALT_WORK_FACTOR = 15; +var FACEBOOK_APP_ID = "504825706245603"; +var FACEBOOK_APP_SECRET = "e5ea0faed85d8749cafd38732530ef35"; // connects to mongodb mongoose.connect('localhost', 'test'); @@ -190,8 +193,9 @@ module.exports = function(app) { * '/dashboard' */ - app.get('/dashboard', function(req, res) { - res.render('dashboard', { + app.get('/dashboard', ensureAuthenticated, function(req, res) { + console.log(req.user.username); + res.render('dashboard', { title: 'kanin', loggedin: true }); |