My favorites | Sign in
Project Logo
       
New issue | Search
for
| Advanced search | Search tips
Issue 768: Oauth - Multiple twitter accounts, twitter gets confused
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  m...@twitter.com
Closed:  Jul 15
Component-OAuth
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by sumit.chachra, Jun 29, 2009
* Does this happen for every OAuth enabled request you make, or only some?
all auth

* What language or library are you using? What versions?
» For Example: Ruby oauth gem version 0.2.7
Python/Django

* What oauth application is this for?
» For Example: I was attempting to post using
http://twitter.com/oauth_clients/details/104 (if you are the owner)
» Or for non-owners: I was attempting to post using MattsOAuthTestApp.
http://twitter.com/oauth_clients/details/2540

* If this is only happening on some requests, what user is affected?
» For Example: Only seems to affect @mzsanford

+ So lets say you're logged into twitter using Account X. 
+ Now you go to www.mysite.com and click "login with twitter". 
+ It takes you to twitter and asks for username/password (earlier it used to just ask for 
deny/authorize, since user was already logged in).
+ Enter details for Account Y, twitter returns user back to mysite.com and you see that user 
instead got logged into mysite.com as an Account X user.  
Comment 1 by m...@twitter.com, Jun 30, 2009
Are you passing any parameters to the /oauth/authorize redirect? Can you provide a URL where I can reproduce 
the issue?
Status: Accepted
Owner: m...@twitter.com
Labels: Type-Defect Priority-Medium
Comment 2 by sumit.chachra, Jun 30, 2009
Sure. You can try it out for example at: http://itunes-for-bay-kids.tivix.com/ (make sure you're already 
logged in with a account), then click "login with twitter" at the top, and login with another account. When you 
return back to the site, you would see login details with the account you were already logged in with.

Its not a bug with my code (afaik) since I've tried on my dev box, and sessions are in-memory, have killed 
memcache etc. You'll notice the bug even when you try the app for the first time (I obviously log in/out all 
day!).

Request looks like:

http://twitter.com/oauth/authorize?
oauth_nonce=87111693&oauth_timestamp=1246396578&oauth_consumer_key=MoGEVU51QjDtcrix4vzCA&
oauth_signature_method=HMAC-
SHA1&oauth_version=1.0&oauth_token=ToNvfrx6NjBsVqYsyvvlJyR3w8yJ8bJFUZkWFWs14&oauth_signature=S8
2symjohq05dlKiI8nRfDcT1%2BQ%3D
Comment 3 by m...@twitter.com, Jul 01, 2009
I went through the flow from http://itunes-for-bay-kids.tivix.com/ and there are a few things:

1. The URL you redirect the user to should only have the oauth_token parameter.
  - The others (and signature) are needed for server-to-server communication, but not for the redirect.
2. You're redirecting to /oauth/authorize … this will display the Approve/Deny page every time.
  - If you redirect to /oauth/authenticate it will automatically direct people back to your site if they are logged 
in to twitter.com and have approved you application.

It still should not be prompting for the username/password. Please correct the issues above and let's see if 
it's still happening. I'll keep the issue open.
Comment 4 by sumit.chachra, Jul 01, 2009
Making these changes resolved the problem.

I still feel that if the application redirects to /oauth/authorize and user enters *a* username/password, that 
should be respected, over automagically logging them in with the account they are already logged in with.

Thanks for the help! (also might wanna add the /authenticate/ url to the twitter.com/oauth/ app details page)
Comment 5 by m...@twitter.com, Jul 01, 2009
I still need to find out what's causing the problem … adding parameters should not do that. Getting this 
feedback was mostly to help figure out the root cause and help me judge the severity of the issue. Still working 
from my previous comment: "It still should not be prompting for the username/password"
Comment 6 by sumit.chachra, Jul 01, 2009
Cool. It wasn't earlier... started happening last 5-10 days I think (no code change on my end).

Hope that helps.
Comment 7 by m...@twitter.com, Jul 01, 2009
I think I found the root cause of the problem. Working on a fix now.
Comment 8 by m...@twitter.com, Jul 02, 2009
Fix completed and awaiting review/deploy.
Comment 9 by sumit.chachra, Jul 02, 2009
Very cool. You guys are  very responsive... am impressed! Thanks and have a good weekend!
Comment 10 by m...@twitter.com, Jul 15, 2009
Fix deployed.
Status: Fixed
Sign in to add a comment

Hosted by Google Code