devise-twitter
devise-twitter copied to clipboard
Store Twitter ID as unique identifier
Wouldnt it be wise to store the twitter id and have that as the primary field instead of the twitter_handle? If a user decides to change his twitter name in twitter.com, then this gem will create a another user record on the db.
Second, how does the app keep track of users who change their twitter handle? At least with the twitter id, this will always be unique never changing...
You are completely right, I did not think of that.
Glad to hear. Keep me updated
Hi MSch, any updates on this?
I've got a partial fix for this submitted as a pull request: http://github.com/MSch/devise-twitter/pull/14
By reading this issue, I get that a couple more changes are needed so that users are looked up by their twitter_id and not twitter_handle.
I will work on that.
Should be ready now.
The twitter_handle is updated (if needed) on connect or signup.
just to clarify, by contacting the twit api with a oauth token and secret and calling verify_credentials will return a user's twitter handle even if the correct one is not in the database. Oauth really is all about creating a secure environment to exchange information over an unsecure network, that was the original purpose anyways.