I'm attempting to throw together a pretty quick mash-up that I think would be useful for folks, and I'd like to make use of Twitter communication. This is my first experience with OAuth, and I've chosen the Twitterizer library to get the job done.
My question comes from the fact that I don't plan on storing user information or having users create accounts (it's meant to be more of a quick utility). Given this, once I get the user's OAuth access token and secret, I have to figure out a secure way of storing them (likely locally) without compromising the security principles of OAuth.
Here's what I'm thinking so far:
- User goes through the process, up until I have their access key and secret
- I encrypt the values and store in a cookie to retrieve later
However, a few questions / concerns:
- What (if anything) prevents someone from impersonating a user via the cookie?
- What is the correct way to deal with potentially multiple users on the same browser? My initial thought is a "logout" button on my app that would kill the cookie, but I'm not sure.
Thanks in advance for any help you can give!