Closed mtjhax closed 13 years ago
Hey mtjhax,
That sounds reasonable. However, this project hasn't been maintained in quite a while. I'd recommend switching to one of the more recently maintained forks like https://github.com/logankoester/authlogic_oauth
Cheers, John
In my project I am using the register button as a single login/register feature and relying on authlogic_oauth validations to prevent me from registering a user more than once -- if user.save fails, I try to log them in with the existing user. I discovered that OAuth tokens from Twitter sometimes change, circumventing the authlogic_oauth validation on unique tokens, causing me to register the user a second time.
The only fix I can think of is a hack -- generally the first part of the OAuth token will be the user ID, and you need to validate that the user ID is unique. If user.save fails the existing token and secret should be updated and used to login.
It's possible I'm just approaching the whole thing the wrong way. If anyone has run into or overcome similar issues, please chime in.