Topic-icon Multiple joomla accounts with 1 facebook account

Active Subscriptions:

None
hello,

Is there a way to NOT allow 1 facebook account to be connected with multiple joomla / jomsocial accounts? Right now this seems to be a problem for us. We use a 3rd party login module ( Improved AJAX Login & Register ). Once a new user is logged in we then want to allow him to connect his account with facebook via sclgoin module. However, we have found that this allows multiple joomla / jomsocial users to be connected to the same facebook account. Any help would be appreciated. Thank you.
The topic has been locked.
Active Subscriptions:

None
12 years 8 months ago #37107 by jacek777
Same thing by the way seems to be allowed when using JFBconnect login module. We can create multiple accounts on our joomla site and link them with a single facebook account. Is there a way to prevent that? This causes an additional problem if you use the facebook login button. Which joomla user will be logged in if there are multiple joomla users connected to the same facebook account? In trails we get the first user ( lower id number ) will be logged in.
The topic has been locked.
Support Specialist
12 years 8 months ago #37111 by alzander
JFBConnect will *not* allow the same Facebook user to be connected to the multiple Joomla accounts. You can check the User Map area of JFBConnect and see what 'connections' have been made between Facebook and Joomla users and there should only be one connection between each.

When using JFBConnect, you shouldn't use other extensions for social network login as others may create different associations. We can't control what other extensions do, so if the other extensions you mention are creating multiple connections, that's something you'd need to discuss with them. In general though, you simply shouldn't be using multiple social network login functionality as each could create their own individual connections between users and causing the problems you're seeing.

I hope that helps explain,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 8 months ago - 12 years 8 months ago #37113 by jacek777
Thx for a quick response Alex. Unfortunately, I have 3 joomla users associated with the same Facebook. See attached screen shots. We are now testing using only sc login module and it still allows it.
File Attachment:


File Attachment:
Last edit: 12 years 8 months ago by jacek777.
The topic has been locked.
Support Specialist
12 years 8 months ago #37116 by alzander
I'm not sure how that would be happening. Can you tell me the process all those users took to link their Facebook account to Joomla? Specifically:
* Were they clicking the Login with Facebook button and logging in with Facebook?
* Were they logging into Joomla and then clicking a Login with Facebook button somewhere else to 'connect' accounts, like in our SCLogin module?
* Are the users all logging in from the same computer, or are they on different computers? This may be a session issue that isn't closing in the browser properly.
* If the same computer/browser, are you logging out of Joomla or Facebook in between the logins?
* Is there anything else you can tell us about the process?
* Are there any extensions that have JFBConnect integration built-in that you are using?

We've *never* seen that happen and there are multiple checks in JFBConnect to prevent duplicate linking of accounts. I don't know of any path that should be creating multiple links between users either, so I'm at a loss. I also just looked at our code and the place where we performing the mapping will look at the Joomla User Id and see if there is already a 'mapping' for that network (facebook). If so, it will only update that row.

So, something is obviously wrong, I just can't tell what and how it would be happening with JFBConnect. That's why knowing if there's some other integration happening it would help as that may be doing it wrong.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 8 months ago #37117 by jacek777
ok. this is what I did:

1. login to my Facebook.

2. Create a user via sclogin module using jomsocial registration flow.

3. After registration is complete I used the "connect via Facebook" button from sclogin while both logged in to joomla with the new user account just created and logged in to Facebook.

At this point 1 joomla user to facebook user association is created.

4. I log out of joomla but stay logged in, in facebook.

5. I repeat steps 2 and 3.

At this point 2 different joomla users are associated with 1 facebook user.

I imagine this can be done ad infinitum.

I am using the same machine and browser without closing either or clearing cache or any other such operation. I'm working on a mac and safari.
The topic has been locked.
Support Specialist
12 years 8 months ago #37122 by alzander
Looks like you may have found a bug when a user tries to 'switch' their Facebook account to a different Joomla user. Not a common situation, but definitely happens and should work.

The fix is very simple, if you're up for making a minor code change. To do so, please edit the /administrator/components/com_jfbconnect/models/usermap.php file. Around line 309, you'll see:
$row->load(array('j_user_id' => $jUserId, 'provider' => $provider));
Change that to:
$row->load(array('provider_user_id' => $providerUserId, 'provider' => $provider));
Let me know how that goes. We have a v5.1.2 release due out tomorrow with a few other bug-fixes, but I'm going to try to streamline this into our test suite and get it into that release as well.

Thanks for notifying us of the issue and describing the steps in such detail.

Alex
The topic has been locked.
Active Subscriptions:

None
12 years 8 months ago #37155 by jacek777
ok. thank you.

there is a change. now it doesn't create multiple associations for the same facebook account but instead it overrides the older association.

another words say user 1j on joomla is associated with user 1f on Facebook.

then, when i go to create user 2j on joomla ( using jomsocial registration flow ) and use JFBconnect button to associate it with a Facebook user ( being logged into 1f facebook account the whole time ), JFBconnect overrides the previous association and connects user 2j with 1f. now user 1j is no longer associated with a facebook account. does that make sense?

in the ideal world it should check and give a message "This facebook account is already being used on this site." and not allow the new association.

any thoughts?
The topic has been locked.
Support Specialist
12 years 8 months ago #37159 by alzander
Overriding the current connection is the behavior intended with that change. We've had it prevent connections in the past and tried other things as well. The one we settled on as working the best is the method above where a user can re-associate their Facebook account with a different Joomla account, if necessary. This has been how JFBConnect has worked for more than 2 years, but you found a bug that was introduced in the v5.1.0 release at the end of August.

For more of our reasoning.. Sometimes user's have 2 accounts on the same site, sometimes this is accidental (like if you're using the Automatic registration feature of JFBConnect) and the ability to 'switch' the login to a different Joomla account has been beneficial in the past. If we deny the link, then it can lead to confusion as the "Connect this account?" text will always show and the user won't be able to update the association even if they want to. Also remember, that most people have only one FB account, so if they want to make that connection it's usually intentional. When you're testing with multiple accounts, things are different.

If you want, we can gladly help you implement some code to deny the update, but it's not something we'd implement in our code from past experience and feedback from our users.

I hope that helps explain, but your feedback is welcome,
Alex
The topic has been locked.