Too many redirects Login problem


#1

Hi,
I want to get OAuth tokens from users who authorize my application. But when I send them to https://api.twitter.com/oauth/authenticate and user accepts it by clicking on “Sign In” button, then Twitter says “Redirecting you back to the application” and redirects to “https://api.twitter.com/oauth/OAUTH_CALLBACK?oauth_token=XXX&oauth_verifier=XXX” where it gets to infinite loop. Browser shows HTTP Error 310 (too many redirects) and never redirects me back to my application.

Would anyone know where could be a problem?

Thanks a lot.

Regards,
Jakub


#2

What value are you passing as oauth_callback when calling /oauth/request_token? It seems like you may have a placeholder (“OAUTH_CALLBACK”) in your code…


#3

Um, nothing I’m afraid. I use some PHP library and the url by which it redirects me to Twitter is: https://api.twitter.com/oauth/authenticate?oauth_token=XXX. Adding oauth_callback param to it (https://api.twitter.com/oauth/authenticate?oauth_token=XXX&oauth_callback=url) doesn’t help. But I have specified callback url in my Twitter app so I thought that I don’t have to send it again.


#4

The oauth_callback parameter needs to be sent to /oauth/request_token, not /oauth/authenticate. Double check that you haven’t missed some configuration option for the library you’re using - if you can post the initialization code and which library you’re using, that would be helpful.


#5

You’re right of course. I’m sorry, I should have looked to the library’s code first, it has quite confusing documentation. Now it works perfectly. Thanks a lot for your advice!


#6

Hi,
I’m using Elliot Haughin Library, I have the same problem returning back to my application, after login twitter returns me to http://mysite.com/twitter/auth.html&oauth_token=xxx&oauth_verifier=xxx.htm
I see errors in the query string itself, but I’m not sure it was really the error.
Any help,
Thanks a lot.


#7

Ok, I found the solution!
It was the query string must be disabled i the config file
Thanks.


#8

Hey everyone!!
I am using “T.signIn()” function to login.
when i call this function a popup is opened allowing the user to sign in with his twitter account.
After signing, the popup is closed and nothing happen.
The problem is that I need to ‘refresh’ my page to be able to get the Twitter response (screen name, image …).
what did i do wrong??can anyone help me??!!
Cheers