Permalink
Browse files

Set up Passport user seralization/deserialization

  • Loading branch information...
1 parent 183b72a commit b762811f3c9c177f1cf4af6c2ccb21a584c2e505 @callahad callahad committed Jul 30, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 server/bin/bigtent
View
9 server/bin/bigtent
@@ -16,6 +16,7 @@ express = require('express'),
fs = require('fs'),
healthCheck = require('../lib/startup_health_check'),
i18n = require('i18n-abide'),
+passport = require('passport'),
passport_yahoo = require('../lib/passport_yahoo'),
routes = require('../routes'),
statsd = require('../lib/statsd'),
@@ -39,6 +40,14 @@ if (config.get('use_https')) {
app = express.createServer();
}
+// Configure Passport user serialization and deserialization
+passport.serializeUser(function(user, done) {
+ done(null, user);
+});
+
+passport.deserializeUser(function(obj, done) {
+ done(null, obj);
+});
app.set('views', path.join(__dirname, '..', 'views'));
app.set('view engine', 'ejs');

0 comments on commit b762811

Please sign in to comment.