diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-24 10:09:30 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-24 10:09:30 +0200 |
commit | 6588bb294fceb091190d03fd4c9bf5b75c68fc64 (patch) | |
tree | a522fa846be2214fdb982c8b87ba23213223b14d | |
parent | removed authenticationcheck on dashboard (diff) | |
download | Divid-6588bb294fceb091190d03fd4c9bf5b75c68fc64.tar.gz |
adding facebooksupport
-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 }); |