Skip to content

Commit

Permalink
Added default value if callbackURL not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
cmccormack committed Jun 12, 2018
1 parent 7bde648 commit 9b4938d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (passport) => {

// Route to authenticate via Twitter API
router.get("/twitter", (req, res, next) => {
const { callbackURL, } = process.env
const { callbackURL="/", } = process.env
passport.authenticate("twitter", {
callbackURL: `${callbackURL}?${queryString.stringify(req.query)}`,
})(req, res, next)
Expand Down

0 comments on commit 9b4938d

Please sign in to comment.