I recommend calling verify_credentials with your new token to
verify the user in question. The screen_name was added as a
convenience method because there were a great many complaints about
have to do yet another round trip for the screen_name.
Thanks;
— Matt Sanford
Right, that's why I keep saying that the callback URL needs to be signed
... so the consumer can protect against tampering of the request.
--
Dossy Shiobara | do...@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
Wait, what? The oauth_token that's returned from the
_oauth/authenticate_ method is already an Access Token, for which you
don't have the secret to.
I'm hoping Twitter fixes this somehow.
Send the user to Twitter how, though? oauth/authorize? How do you know
if this is the user's first time or not?
> 3) user returns and app uses request token to get user access token
> which get stored.
This is fine, unless the user returns with an access token and not the
original request token. This is what currently happens with
oauth/authenticate.
> 4) user come back to site to sign in and is not signed in.
> 5) site gets request token from twitter.
> 6) user is sent to twitter with request oauth_token and are
> automatically redirected back to site.
> 7) access oauth_token is returned with user which can be matched with
> oauth_token_secret stored in the database.
This would work fine, assuming in step #2 you had some way of knowing
whether a Twitter user had never previously OAuth authorized your app.
Send the user to Twitter how, though? oauth/authorize? How do you know if this is the user's first time or not?
On 4/17/09 2:51 AM, Abraham Williams wrote:
They correct flow is:
1) get request token from twitter.
2) send user to twitter with oauth_token for the first time.
This is fine, unless the user returns with an access token and not the original request token. This is what currently happens with oauth/authenticate.
3) user returns and app uses request token to get user access token
which get stored.
This would work fine, assuming in step #2 you had some way of knowing whether a Twitter user had never previously OAuth authorized your app.
4) user come back to site to sign in and is not signed in.
5) site gets request token from twitter.
6) user is sent to twitter with request oauth_token and are
automatically redirected back to site.
7) access oauth_token is returned with user which can be matched with
oauth_token_secret stored in the database.
--
Dossy Shiobara | do...@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
OMG awesome! Thank you SO much for the quick turn-around, Matt.
Now, can someone help investigate why I keep getting HTTP 500 responses
to my OAuth requests? (FYI, HTTP Basic Auth requests for the same users
succeed just fine.)
Done! Thanks.
http://code.google.com/p/twitter-api/issues/detail?id=478
It's now available on Twitter Karma! I'm still allowing folks to use
their Twitter user/password and HTTP Basic Auth. just in case, but it's
there.
Matt, you really kicked ass this week w/ OAuth. Thanks!