bnoguchi/mongoose-auth

Twitter auth problem

Closed this issue · 4 comments

I'm having a problem with the twitter auth on my site if someone clicks the link "click here to continue" while twitter is redirecting. In such a case the URL is the same as if they allowed twitter to redirect automatically, but the server has an empty response and then nothing loads.

Waiting for twitter to automatically redirect works exactly as expected (but I can't make people wait)

Any ideas?

Let me try to re-produce this. I'll get back to you.

@tblobaum Ah, this is happening because of a race condition. Twitter's Oauth site redirects back to the callback path just before you/I click the manual link. Therefore, the node server handles the request twice. The first time, it succeeds, extracting the request token and using it to request an access token (an action which invalidates the request token); the second time, it fails because it extracts the same request token which is now stale (in order to get an access token). The behavior of the system is currently last request wins.

I'm going to try and see if I can make a fix for this.

Just fixed this via bnoguchi/everyauth@7cb7aa0

Just upgrade to the newest everyauth v0.2.12:

$ npm install everyauth

You rock!

On Fri, Jul 1, 2011 at 3:42 PM, bnoguchi
reply@reply.github.com
wrote:

Just fixed this via bnoguchi/everyauth@7cb7aa0

Just upgrade to the newest everyauth v0.2.12:

   $ npm install everyauth

Reply to this email directly or view it on GitHub:
#30 (comment)