From 4d73eb92cbc135850e20b2390698105ff8edf3cd Mon Sep 17 00:00:00 2001 From: yo mama Date: Fri, 5 Dec 2014 19:46:45 -0800 Subject: waiting until everyauth is updated --- bin/app.js | 31 ++++++++++++++++++++++++++----- package.json | 1 + 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/bin/app.js b/bin/app.js index 1d4ca61..eeec8d5 100755 --- a/bin/app.js +++ b/bin/app.js @@ -7,20 +7,41 @@ var express = require('express'), bodyParser = require('body-parser'), cookieSession = require('cookie-session'); var config = require('../config/main'); - +var everyauth = require('everyauth'); + var app = express(); app.use(morgan('combined')); -app.use(bodyParser.json()); // for parsing application/json app.use(multer({inMemory: true})); -app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.use(expressValidator()); -app.use(cookieParser()); -app.use(cookieSession({secret: 'app_1'})); +app.use(bodyParser.json()); // for parsing application/json +app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded +app.use(cookieParser('some secret')); +app.use(express.session()); +app.use(everyauth.middleware(app)); +//app.use(cookieSession({secret: 'app_1'})); app.use(express.static('../public')); app.use(express.static('../public/vendor')); //app.use(express.favicon(__dirname + '/public/images/shortcut-icon.png')); //app.use(messages()); +//Important - Some OAuth Providers do not allow callbacks to localhost, +// so you will need to create a localhost alias called local.host. Make +// sure you set up your /etc/hosts so that 127.0.0.1 is also associated +//with 'local.host'. So inside your /etc/hosts file, +// one of the lines will look like: +// +//127.0.0.1 localhost local.host +//ABORT ABORT +//this project needs to be updated to not use connect +//CONTINUE LATER...for the time being use passport +// +// +// +// + +// + + app.set('view engine', 'ejs'); app.set('views', 'views'); diff --git a/package.json b/package.json index 804cec6..6206843 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "cookie-parser": "^1.3.3", "cookie-session": "^1.1.0", "ejs": "^1.0.0", + "everyauth": "^0.4.9", "express": "^4.10.4", "express-validator": "^2.7.0", "fs-extra": "^0.12.0", -- cgit v1.2.3-70-g09d2