Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next is not a function #124

Open
davich opened this issue May 8, 2020 · 1 comment
Open

Next is not a function #124

davich opened this issue May 8, 2020 · 1 comment

Comments

@davich
Copy link

davich commented May 8, 2020

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. (/var/task/node_modules/oauth/lib/oauth2.js:157:7)",
" at IncomingMessage.emit (events.js:323:22)",
" at IncomingMessage.EventEmitter.emit (domain.js:482:12)",
" at IncomingMessage.wrapped (/var/task/node_modules/newrelic/lib/transaction/tracer/index.js:188:22)",
" at IncomingMessage.wrappedResponseEmit (/var/task/node_modules/newrelic/lib/instrumentation/core/http-outbound.js:218:24)",
" at endReadableNT (_stream_readable.js:1204:12)"
]
}

@davich
Copy link
Author

davich commented May 8, 2020

At the least could you have a default callback that throws the error, so the error message doesn't get lost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant