Add cookie secrets to env

This commit is contained in:
Berkeley Martinez
2015-06-04 12:42:13 -07:00
parent 02b195511e
commit 72fe9c2463
3 changed files with 20 additions and 7 deletions

View File

@ -65,25 +65,36 @@ Edit your .env file with the following API keys accordingly (if you only use ema
```
MONGOHQ_URL='mongodb://localhost:27017/freecodecamp'
BLOGGER_KEY=stuff
FACEBOOK_ID=stuff
FACEBOOK_SECRET=stuff
GITHUB_ID=stuff
GITHUB_SECRET=stuff
GOOGLE_ID=stuff
GOOGLE_SECRET=stuff
LINKEDIN_ID=stuff
LINKEDIN_SECRET=stuff
MANDRILL_PASSWORD=stuff
MANDRILL_USER=stuff
SESSION_SECRET=secretstuff
TRELLO_KEY=stuff
TRELLO_SECRET=stuff
TWITTER_KEY=stuff
TWITTER_SECRET=stuff
TWITTER_TOKEN=stuff
TWITTER_TOKEN_SECRET=stuff
BLOGGER_KEY=stuff
SLACK_WEBHOOK=stuff
SESSION_SECRET=secretstuff
COOKIE_SECRET='this is a secret'
PEER=stuff
DEBUG=true

View File

@ -60,4 +60,6 @@ module.exports = {
passReqToCallback: true
},
slackHook: process.env.SLACK_WEBHOOK,
cookieSecret: process.env.COOKIE_SECRET
};

View File

@ -65,7 +65,7 @@ app.use(expressValidator({
}
}));
app.use(methodOverride());
app.use(cookieParser());
app.use(cookieParser(secrets.cookieSecret));
app.use(session({
resave: true,
saveUninitialized: true,