podio / podio-rb

The official Ruby wrapper for the Podio API used and maintained by the Podio team
https://podio.com
MIT License
66 stars 53 forks source link

Using this gem in a multi-user system #35

Closed dominicsayers closed 8 years ago

dominicsayers commented 8 years ago

My app has many users. Each of them has their own Podio credentials, which I allow them to define using the podio-ominauth strategy.

I am a bit alarmed that the models in this gem all use the singleton method Podio.connection to issue API calls to Podio. This appears to use whichever user's credentials were last passed to Podio.setup.

I may be misunderstanding the architecture of this gem. Please reassure me that I am wrong about this and my many users will not be seeing each others' data in my app.

dominicsayers commented 8 years ago

OK, I think I understand how this is supposed to work. So long as I properly authenticate within a thread prior to each use of the interface then it should be safe.

I think this architecture is unusual but I can see how it works now.