× Joomla Facebook Connect support forum

Topic-icon User cannot login with JFBConnect after logout

Active Subscriptions:

None
I have modified the appropriate JomSocial files to add the JFBC buttons.

1. Currently when a user tries to login with the JFBC button, the user is not logged into the site.

2. This login function was working before; but now it's not. When it was working, if a user logge into the site using Facebook and then logged, when the user tried to log back in by clicking on the Login with Facebook button, the login popup quickly appeared and then disappeared, and the user cannot login. The only way to resolve this by clearing the browser cache.

See: planethop.com/socialize
The topic has been locked.
Support Specialist
11 years 3 months ago #29814 by alzander
I think your issue is related to the Javascript message I referenced in this other thread. On the page you linked to though, I can actually see the Facebook Javascript library being included multiple times toward the bottom of the page. That looks to be from JomSocial, but it's also commented out.

I honestly can't seem to find the Javascript that's trying to call that functionality or interfering, but there's something going on with another extension doing some Facebook-y stuff.

If you can't find it, I'd recommend disabling some other modules/plugins that may have Facebook integration and see if that helps the situation. Once you find a combo that works, let us know and we can help you make them work better together.

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

None
11 years 3 months ago #29873 by planethop
User can now login to the site using the Facebook login, but after a user logins, instead of being re-directed to their JomSocil profile, they are re-directed to the the following link:

planethop.com/index.php?option=com_bids&...itprofile&Itemid=247

Do have any idea how this can be fixed?


Also issue #2 from above still exists. I'm still trying to figure out what's interfering with re-logging in with Facebook after logout.
The topic has been locked.
Support Specialist
11 years 3 months ago #29883 by alzander
Planethop,
For the redirection issue, can you tell me what the setting for "New User Redirection" and "Returning User Redirection" in JFBConnect is? Obviously, if it's going to that bid / edit page, that's the problem. If it's set somewhere else, then can you check any User plugins you have enabled? There are some user plugins that are meant to redirect the user after they login to the site. If you have one of those enabled, that's likely where the redirection is occurring.

As for the logging out and back in again, I just tried this. After logging out, I went back to the socialize page and tried to login and got the following Javascript error:

Uncaught TypeError: Cannot read property 'x' of undefined modal.js:274

Not sure why that's happening, but it helps narrow down something to try. Can you turn off the "Show Logging In Popup" (or whatever it's called) setting in the JFBConnect configuration area? The modal.js file is part of Joomla, and what we use to display that white-box, and it seems to be having issues on that page. Knowing if disabling that feature fixes the issue will help figure out the cause (and may get you going right now until fixed).

Thanks,
Alex
The topic has been locked.
Support Specialist
11 years 3 months ago #29884 by alzander
Actually, the page was just hanging there while I created that post. Now, it finally just went to an Internal Server Error page. Still not sure why, and the test above is still a good start. That error page also suggests that looking into a possible error may help as well. Can you also go to the Joomla Global Config and set GZip compression to "No" and set Error Reporting to "Maximum". Then try to login.

If that doesn't help show the error, you may need to try to look into your server error logs to get a report of what actually is failing.

Keep us posted on what you find. Also, please confirm what is, or isn't, happening when you try to login. Do you get the same error page, or does something else happen?

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

None
11 years 3 months ago #29993 by planethop
Hi Alex,

The re-directions were not set properly. It was pointing to the Auction page. I fixed them. Terrific catch!

Logout Of Joomla Only: was set to “Yes”, I changed to “No”.
Show 'Logging In' popup: was set to “Yes”, I change to “No”
GZip Compression set to "No"
But the issue still did not go away. User logged out, tried to log back in and was automatically logged into the site with their Facebook account.

When I look in the Joomla backend to see who is logged in, the Facebook users "jlange" and "sanmar" are shown as logged in multiple times. "jlange" logged in from IE browser. "sanmar" logged into from Chorome browser.

File Attachment:



- Ash
The topic has been locked.
Support Specialist
11 years 3 months ago #30036 by alzander
Ash,
I just tested on your site, but wasn't able to see my user auto re-logged back in after logging out. The server error above also didn't occur, so disabling the Login Modal seems to have fixed that problem (hopefully), which is a good thing.

Some notes to be aware of:
* If the users are using the other Login with Facebook button on your site to login, then our functionality isn't going to work as expected. I'll be answering shortly how to replace that button, and maybe that will fix the problem.
* The Logout Joomla Only setting will only work if you are using our SCLogin module's logout button. I forgot about that. However, the auto-login functionality will be automatically disabled whenever a user clicks any logout button, preventing them from being re-logged back in.

Bottom lining it: they shouldn't be logged back in automatically if they're using our Login with Facebook button, and that's the main thing I'd try to figure out if that's the cause.

Now, going back to your question above, you state:

User logged out, tried to log back in and was automatically logged into the site with their Facebook account.

When you say "tried to log back in", did they click the Login with Facebook button again? If so, then the behavior sounds right.. they are trying to login, and JFBConnect is doing that for them. They may not see the Facebook login popup if they are still logged into Facebook (see the bullet above). You can test if you are still logged into Facebook by simply going to Facebook.com after logging out of your site and seeing if you are still logged in there.

So, can you help clarify one last time:
* When the user logs out, are they being automatically re-logged back in... basically, they are unable to log out of your site. (this would be bad behavior)
* When the user logs out and tries to log back in again, they simply aren't being asked for their FB user credentials again (this would be normal behavior in some circumstances).

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

None
11 years 3 months ago #30042 by planethop
Alex,

Here are the steps that I took:
1. User logged in from my JomSocial page (planethop.com/socialize) with the JFBC Facebook Login button.
2. User redirected to the their JomSocial Profile page.
3. User logged off from there using the small JomSocial button to the right.
4. User redirected to the JomSocial page (planethop.com/socialize)
5. User clicked on JFBC Facebook Login button.
6. Facebook login popup came up quickly and then disappeared. After some seconds, the user was logged back into the site and redirected back to their JomSocial profile page.

Users are automatically logged back in when they try to login with the JFBC Connect Login button after they have logged out of the site. Apparently they are never really logged out of the site. If you look at the Joomla Admin backend for logged in users, it shows multiple instances of the user who was supposedly logged out, still logged in.

File Attachment:


The above does not happen if you login and logout with your normal credentials - instead of using the Facebook login.
The topic has been locked.
Support Specialist
11 years 2 months ago #30051 by alzander
For the session stuff, that's completely taken care of by Joomla's User Plugin. I'm not sure why it's not properly deleting the row in the database for the session, but it will be cleared after the Session Timeout occurs automatically. Additionally, the session cookie for the user that identifies that browser with the row in the session database will be deleted which means that the user actually isn't still logged into the site, but their session data seems to be remaining until it's timed out by Joomla. My only suggestion for that is to re-order the Joomla - User plugin to be before the JFBConnect - User plugin and see if that improves things. I just tested in Joomla 2.5 and that's definitely not an issue as the Joomla - User plugin is properly deleting the session row.

As for your issue about logging out and in again. You mention "Users are automatically logged back in", but in your steps, one of them is "User clicked on JFBC Facebook Login button. ". That means they are not automatically logged back in, they have chosen to log back in. If the user is already logged into Facebook in another tab, and they click the Login with Facebook button, yes, they will be logged back in without having to enter their credentials. That's a feature of Facebook and it allows a quicker logging in process since they are already logged in *to Facebook*.

If you simply update your steps to the below, I think you'll see what I'm talking about.
1. User logged in from my JomSocial page (planethop.com/socialize) with the JFBC Facebook Login button.
2. User redirected to the their JomSocial Profile page.
3. User logged off from there using the small JomSocial button to the right.
4. User redirected to the JomSocial page (planethop.com/socialize)
5. User goes to Facebook.com and logs out
6. User clicked on JFBC Facebook Login button.

Once the user logs out of Facebook (either by going to fb.com and logging out or using the SCLogin logout button to have them logged out of Facebook), the next time they try to login, they will have to re-enter their credentials.

Hope that helps, but if not, let me know.

Alex
The topic has been locked.
Active Subscriptions:

None
11 years 2 months ago #30057 by planethop
1. User - Joomla! plugin is already before the USer - JFBConnect Facbook plugin.

2. The user was not logged into Facebook in another window, when they clicked logout. Facebook was not open in any window at all. But are you saying that they are still supposed to be logged back in automatically when they click on the SCLogin button - even if they are not logged in to Facebook on another window?
The topic has been locked.