add state attribute to linked oauth
note: a new variable will need to be added to .env 'LINKEDIN_STATE' which is a random string
This commit is contained in:
@ -104,6 +104,9 @@ module.exports = {
|
|||||||
clientID: process.env.LINKEDIN_ID,
|
clientID: process.env.LINKEDIN_ID,
|
||||||
clientSecret: process.env.LINKEDIN_SECRET,
|
clientSecret: process.env.LINKEDIN_SECRET,
|
||||||
scope: ['r_fullprofile', 'r_emailaddress'],
|
scope: ['r_fullprofile', 'r_emailaddress'],
|
||||||
|
oAuthOptions: {
|
||||||
|
state: process.ENV.LINKED_STATE
|
||||||
|
},
|
||||||
failureFlash: true
|
failureFlash: true
|
||||||
},
|
},
|
||||||
'linkedin-link': {
|
'linkedin-link': {
|
||||||
@ -118,6 +121,9 @@ module.exports = {
|
|||||||
clientID: process.env.LINKEDIN_ID,
|
clientID: process.env.LINKEDIN_ID,
|
||||||
clientSecret: process.env.LINKEDIN_SECRET,
|
clientSecret: process.env.LINKEDIN_SECRET,
|
||||||
scope: ['r_fullprofile', 'r_emailaddress'],
|
scope: ['r_fullprofile', 'r_emailaddress'],
|
||||||
|
authOptions: {
|
||||||
|
state: process.ENV.LINKED_STATE
|
||||||
|
},
|
||||||
failureFlash: true
|
failureFlash: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -257,8 +257,8 @@ R.keys(passportProviders).map(function(strategy) {
|
|||||||
* 500 Error Handler.
|
* 500 Error Handler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//if (process.env.NODE_ENV === 'development') {
|
// if (process.env.NODE_ENV === 'development') {
|
||||||
if (true) {
|
if (true) { // eslint-disable-line
|
||||||
app.use(errorHandler({
|
app.use(errorHandler({
|
||||||
log: true
|
log: true
|
||||||
}));
|
}));
|
||||||
|
Reference in New Issue
Block a user