× Joomla Facebook Connect support forum

Topic-icon Logging in to Joomla - Different scenarios (need feedback!)

Support Specialist
There's been 2 posts recently about a scenario that some people are unsure about, and would like to have your feedback on the suggested fix. It's not exactly a 'bug', but can see how people would think it's not operating as it should be.

Background:
Creating a new Joomla user:
When we create a Joomla user using their Facebook information, we 'map' that user's Facebook ID to their Joomla ID. This way, when they return and log in with their Facebook credentials, we automatically log that user into the Joomla side. No real problems there.

Linking a FB account to an existing Joomla user:
When a user logs into Joomla with an account they already have, JFBConnect shows a "Connect this account to your Facebook account?" text. If you click that, then your users are mapped. Upon returning, you can use your FB credentials to log 'both' your users in.

Problem:
If a Joomla user (created through their FB account) user updates their Joomla password and returns to the site and logs in to that Joomla account (NOT logged into FB), JFBConnect still shows the "Connect this account to your FB account?" text.

- If they log into FB now with their original FB account, nothing changes.. the mapping stays the same, all is good.
- If they log into FB now with a different FB account, their mapping is updated (which could be bad). The joomla user they had no longer has a FB account associated with it, and the Joomla user their logged in with is now mapped to 'this' FB ID.

Reasoning:
The reason that users are allowed to update their mapping is in case a user has a Joomla account on your site (lets say for 5 years), and comes one day and accidentally logs in with their FB account. That creates them a 'new' Joomla user. If we didn't allow re-mapping, that user would have to make a choice as to which user to continue using (or you as the admin would have to fiddle with some things to re-map them).

Generally, users only have one FB account, so this issue isn't that bad. It may create some extra Joomla users on your site, but really not pain your users.

Solutions:
1) Leave it as is. Allow you to change the text in the Login module to say whatever you want so the "Connect this account to FB" isn't confusing.
2) Lock 'mappings' so that once a FB ID is used, it can't be reused. We'd update the login module to check the Joomla user and see if the user already checked in has a mapping and just not show that text.
3) Lock mappings. If a user performs a FB connection, come up with a way to ask a user if they already have a Joomla account, and want to use that for their mapping.
4) Your suggestion!

Please keep in mind, one of our highest goals with JFBConnect is making it easy to use (and code). Having 20 options to allow each method isn't really an option. So we'd like to get some feedback for a few days, then make a decision. We don't think that any path will be overly difficult, but want to make sure it's the best.

Thanks for your input!
The topic has been locked.
Active Subscriptions:

None
15 years 1 month ago #292 by Clark
My vote goes for 'leave it as is' with customisable text. Perhaps a mouse over/on-click tool tip would allow the process to be explained easier without cluttering the login/out module. Something along the lines of "Why Connect With Facebook?" which is prominent (colour, icon, etc) and an explanation of the benefits (easier Log in, post back to wall, invite friends etc) can be provided in a user firendly way.
The topic has been locked.
Active Subscriptions:

None
I would vote for 3. I have had some issues where I accidentally mapped my own account to a new FB account when I had not planned on it. Checking to make sure the user REALLY wants to map to a new account but allowing them to do so gives us the most flexibility in my opinion.

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

None
Yes - option 3 is the ideal way.

Perhaps the method of finding out if they already have a Joomla account is to give them the option to input their existing Joomla user name and password at some point when the user has logged in using their FB credentials - if their Joomla account details are correct then just map their FB and Joomla accounts.
The topic has been locked.
Active Subscriptions:

None
I would vote for no 3 for flexibility (I also has users that has 2 accounts due to fb login). But the following is some other consideration :

Correct me if I am wrong as I am just a rookie, but I think the issue above can be solved if we can agree on the common parameter between joomla user dan FB user. Most FB users are using their emails as their login names and all joomla users should have entered their email data when they registered.
So mapping shall be unique : having the same email address. If a joomla user with <!-- e --><a href="This email address is being protected from spambots. You need JavaScript enabled to view it.">This email address is being protected from spambots. You need JavaScript enabled to view it. email wants to map to his FB with This email address is being protected from spambots. You need JavaScript enabled to view it.">This email address is being protected from spambots. You need JavaScript enabled to view it., all he needs to do is changing his email data in joomla to This email address is being protected from spambots. You need JavaScript enabled to view it.">This email address is being protected from spambots. You need JavaScript enabled to view it..
Now, the next problem is getting email data from FB user :
If we can not get the email data from FB, is it possible to get the email data from the user directly by requiring user to use their email adress as their login name. If this is possible than :
- we should have a single login/password form for both joomla and FB users. ( I don't think joomla user would mind to login using their email address as their login name.)
- To give user option either to login using Jomla or FB, we can give options using radio button perhaps in the login module.
- When a user is keying in their FB username(mostly in form of email address) & password, the module will check first whether this email is already registered in joomla dbase. If it is, then that joomla username (won't be used anymore anyway for logging in) will automatically be mapped with this fb user(confirmation from user can also be an option). If it is not, then a new joomla user shall be created using the email address entered or if the user opts not to sync then leave it unsync-ed.
- Only after the above process is done, then the username & password keyed in is passed to FB to continue FB login process. (Pulling avatar & other data @ first sync or going to invite page for non-first login)
- When a user is keying in their joomla username (now in form of email address), system will check whether combination of email and password keyed-in can log user in FB. - If it can, then user can be given sync option.
Ofcourse in both cases, the system shall check prior to any of the above process, whether the user mapped already. If already mapped, then we shall skip all the sync options above.

One thing I am not very sure of is whether we can pass username & password drawn from joomla forms to FB and make the user logged in.
The topic has been locked.
Active Subscriptions:

None

Generally, users only have one FB account, so this issue isn't that bad. It may create some extra Joomla users on your site, but really not pain your users.


I don't think so. It should be avoided that one person has a Joomla and FB user account on one site. If you use for example Jomsocial this solution is not very practical because you loose your profile data depending on how you log in.

So I would prefer also solution number 3 maybe with a neat modal dialog with a short explanation. But at the moment I have no suggestion how to do this in a elegant way.

Maybe another solution (my number 4) ... don't offer the FB Connect Button to guests at all !? Only if they decide to register and click the register link ... If the FBConnect button is shown to logged in Joomla users they can connect their FB Account. If there is already a mapped FB account a dialog can be shown ato remap the account.
The topic has been locked.