passport-twitter: Sample error: “InternalOAuthError: failed to obtain request token”

I get this when trying the sample.

This is my callback URL:

callbackURL: "http://127.0.0.1:3000/auth/twitter/callback"

InternalOAuthError: failed to obtain request token at /Users/frode/Dropbox/Nettsider/signin/node_modules/passport-twitter/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth.js:155:36 at /Users/frode/Dropbox/Nettsider/signin/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:510:17 at passBackControl (/Users/frode/Dropbox/Nettsider/signin/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:366:13) at IncomingMessage.<anonymous> (/Users/frode/Dropbox/Nettsider/signin/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:378:9) at IncomingMessage.emit (events.js:88:20) at HTTPParser.onMessageComplete (http.js:137:23) at CleartextStream.ondata (http.js:1137:24) at CleartextStream._push (tls.js:367:27) at SecurePair.cycle (tls.js:688:20) at EncryptedStream.write (tls.js:122:13)

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

For me, the issue was a npm audit fix --force after installing passport-twitter which fixed 3 moderate vulnerabilities of the package.

After reverting this, the issue no longer persists.

Hi. After I specified a callback URL on dev.twitter.com it seems to be working fine.