Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to login through facebook and google using same email #4

Open
neerajsingh0101 opened this issue Sep 17, 2010 · 8 comments
Open

Comments

@neerajsingh0101
Copy link

Thanks for the gem. It works nicely except in one scenario.

In my app email address is key so I have setup such that email must be provided.

I first login through facebook with email [email protected] . So now I have a record in the database for john. I use before_rpx_auto_create hook.

Now if I login through google.com using the same email address [email protected] then even though the rpx box says I am loggin through google.com the signed_in? method of devise returns false.

Any thoughts on this issue.

Thanks

@nicolasblanco
Copy link
Owner

Yeah.

Currently the plugin uses the RPX identifier to authenticate and to create new users in the database. This identifier is unique and links to 1 user on 1 social network.

So if you login using 3 different social networks, it will create 3 different users even if the popup remembers the old connection and you use the same email address for each social network...

Like written in the README TODO, it should be possible to implement some kind of multiple account mapping. The author of authlogic_rpx wrote some kind of implementation.

The first thing we should do is to store the rpx_identifier in a separate table. So one user may have multiple rpx_identifiers. Then, we could write some strategy : for example, like the feature you want to implement : a new connection with a new rpx identifier but using an existing email address could be linked to the existing user...

If you work on this, I'll accept your contributions...

@neerajsingh0101
Copy link
Author

So if you login using 3 different social networks, it will create 3 different users even if the popup remembers the old connection and you use the same email address for each social network...

My experience was that if one user [email protected] is logged in through facebook and if John tries to log in through google then another record is not created. Also John is stuck and is not logged in.

@neerajsingh0101
Copy link
Author

I'm willing to work on patch once I understand the strategy and what needs to be done.

@danieljohnmorris
Copy link

you need to pay for rpx, and implement single signon

@raid5
Copy link

raid5 commented Sep 28, 2010

As said danieljohnmorris, it appears Account Mapping is only available in the Plus account ($10/mo).

@medihack
Copy link

Does that mean when having a Janrain Plus account that feature would work automatically, or are there additional modifications of devise_rpx_connectable needed?

@TheEmpty
Copy link

TheEmpty commented Nov 3, 2010

No you do not need the Janrain Plus, I am currently working on making a fix myself which I can contribute once it's done. But mine will not use has_many :identifiers so that it may be backward compatible, but it can easily be added and I might just do that.

@TheEmpty
Copy link

TheEmpty commented Nov 3, 2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants