Skip to content

Commit

Permalink
add state attribute to linked oauth
Browse files Browse the repository at this point in the history
note: a new variable will need to be added to .env 'LINKEDIN_STATE'
which is a random string
  • Loading branch information
Berkeley Martinez authored and Berkeley Martinez committed Jun 18, 2015
1 parent bb6f153 commit bfddc03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions server/passport-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ module.exports = {
clientID: process.env.LINKEDIN_ID,
clientSecret: process.env.LINKEDIN_SECRET,
scope: ['r_fullprofile', 'r_emailaddress'],
oAuthOptions: {
state: process.ENV.LINKED_STATE
},
failureFlash: true
},
'linkedin-link': {
Expand All @@ -118,6 +121,9 @@ module.exports = {
clientID: process.env.LINKEDIN_ID,
clientSecret: process.env.LINKEDIN_SECRET,
scope: ['r_fullprofile', 'r_emailaddress'],
authOptions: {
state: process.ENV.LINKED_STATE
},
failureFlash: true
}
};
4 changes: 2 additions & 2 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ R.keys(passportProviders).map(function(strategy) {
* 500 Error Handler.
*/

//if (process.env.NODE_ENV === 'development') {
if (true) {
// if (process.env.NODE_ENV === 'development') {
if (true) { // eslint-disable-line
app.use(errorHandler({
log: true
}));
Expand Down

0 comments on commit bfddc03

Please sign in to comment.