Next is not a function
Strategy calls error here (passport-oauth2/lib/strategy.js:175). Error function (passport/lib/middleware/authenticate.js:361) expects there to be a next variable in scope. There is no next variable in scope.
{
"errorType": "TypeError",
"errorMessage": "next is not a function",
"stack": [
"TypeError: next is not a function",
" at OAuth2Strategy.strategy.error (/var/task/node_modules/passport/lib/middleware/authenticate.js:361:9)",
" at /var/task/node_modules/passport-oauth2/lib/strategy.js:175:34",
" at /var/task/node_modules/oauth/lib/oauth2.js:191:18",
" at passBackControl (/var/task/node_modules/oauth/lib/oauth2.js:132:9)",
" at IncomingMessage.
At the least could you have a default callback that throws the error, so the error message doesn't get lost?