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

Sample error: “InternalOAuthError: failed to obtain request token” #3

Closed
repoman opened this issue Jan 25, 2012 · 15 comments
Closed

Comments

@repoman
Copy link

repoman commented Jan 25, 2012

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. (/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)

@timisbusy
Copy link

I ran into the same issue and found that it only happened when I ran the app through http://localhost:3000. When the request went out through http://127.0.0.1:3000/ the token came through. Hope that helps.

@romefort
Copy link

romefort commented Feb 1, 2012

same problem here, using http://127.0.0.1:3000/ did not help

@repoman
Copy link
Author

repoman commented Feb 20, 2012

I accessed the app at http://127.0.0.1:3000 and set the callbackURL to http://127.0.0.1:3000/auth/twitter/callback. I get the same error, still.

@repoman
Copy link
Author

repoman commented Feb 20, 2012

Which Node.js and Express versions are you using? I’m using Express 2.2.0 and the latest Node.js, 0.6.11.

@ljharb
Copy link

ljharb commented Feb 26, 2012

This continues to happen to me occasionally. It seems to fix itself over a period of time, regardless of whether I use localhost, 127.0.0.1, or any other hostfile alias. There's no way I'm getting rate limited by Twitter, and my internet continues to work just fine, so it's got to be something in the library. At the moment I have Node v0.6.11 and Express v2.5.8.

Anyone have any ideas?

@adaoraul
Copy link
Contributor

adaoraul commented Mar 8, 2012

I believe with my pull request #5 this problem will be solved

@repoman
Copy link
Author

repoman commented Mar 15, 2012

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

@jaredhanson
Copy link
Owner

I've just pushed new versions of passport-oauth (v0.1.7) and passport-twitter (v0.1.3). I suggest upgrading to these, as the error messages are more detailed. Any failure responses from the Twitter API will be reported, and it'll be clear wether the failure is on that side or on the local system (and what can potentially be done about it).

If this helps isolate any errors to something specific to Passport, file an issue. Thanks!

@iammerrick
Copy link

Still seeing this with latest packages....

@ktkaushik
Copy link

yeah, same here

@RPGillespie6
Copy link

RPGillespie6 commented Sep 14, 2016

@ktkaushik Are you sure you have the tokenURL set right? I was using GitLab OAuth, and I copy pasted the token URL from their documentation and it turned out to be wrong (if you copy-paste) and that's what was causing it for me.

@vengateshsubramaniyan
Copy link

Same problem here and I also solved that using npm update

@Pana
Copy link

Pana commented May 28, 2018

Same problem here

@delivey
Copy link

delivey commented Oct 14, 2021

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.

@Naeem-gg
Copy link

Naeem-gg commented Dec 1, 2022

"InternalOAuthError: failed to obtain request token"
I ran into the same problem with latest "passport-twitter","express", and Node.
Is there any solution out there.

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