authlogic-connect icon indicating copy to clipboard operation
authlogic-connect copied to clipboard

Map confirmation email to user in database.

Open lancejpollard opened this issue 15 years ago • 1 comments

Example:

If user has logged in through Twitter, and then logged out, they now have an account and an OauthToken for twitter. Now if they login through MySpace, and we have the confirmation email thing setup, when they enter their email, we should find the user by that email, and associate that account with them, not create a new user.

lancejpollard avatar May 31 '10 23:05 lancejpollard

Any ideas where to start with this?

I would think that on line 45 of oauth/session.rb before creating a new user record we should do a find_or_create_by_email. The only problem is that I don't see the users email address within scope. I guess we would need to make a second call to that provider to retrieve the users info. Does that seem reasonable?

Line 45 http://github.com/viatropos/authlogic-connect/blob/master/lib/authlogic_connect/oauth/session.rb#L42

jspooner avatar Oct 25 '10 18:10 jspooner