lancejpollard / authlogic-connect

Instant Oauth and OpenID support for your Rails and Sinatra Apps
MIT License
148 stars 27 forks source link

Consumer is corrupted if oauth and api paths are different #18

Closed aac closed 14 years ago

aac commented 14 years ago

Hey Lance,

I thought my reset_consumer fix would be sufficient for this . . . but it only works in the happy land of a single user/single access test environment. As soon as any user authorizes (in particular, with Foursquare), that network's OauthToken's consumer will be corrupted, so any future API calls will be directed to the wrong address. It works in the single user/access case simply because there aren't API calls being made concurrently to the auth process.

Any thoughts on the best way to fix this? Is there anything wrong with just building a new consumer every time instead of caching it? (or maybe, every time for auth . . . and only caching for API or something?)

-Andrew

aac commented 14 years ago

So, not caching the consumer does seem to be a fix.

lancejpollard commented 14 years ago

Did I really make that a class method :p. Good catch, I'll change this right away.

lancejpollard commented 14 years ago

fixed