Topic-icon Facebook redirection do not login into Joomla!

Active Subscriptions:

None
10 years 1 month ago #57986 by matagu
When i'm trying to login using JFBConnect, the redirection seems to do not login into Joomla! and go to login again. I have my own OAuth authentication plugin and i need to integrate it to JFBConnect. Any ideas where can found information?
The topic has been locked.
Support Specialist
10 years 1 month ago #57988 by alzander

I have my own OAuth authentication plugin and i need to integrate it to JFBConnect.

Can you explain this a bit more? Are you using the JFBConnect authentication or not? You mention Facebook in the subject, and we already fully support that with our OAuth library. I'm not sure why you'd want to replace that.

If you've made any modification to our component or plugin files, let us know so we understand your situation better.

Once things are more clear, we'll gladly help however we can.

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

None
10 years 1 month ago #58134 by matagu
Hi alzander,

I have working in my website a oauth2 server using my own libraries (github.com/fastslack/matware-libraries) because i'm offering an API via webservices, so i need this oauth2 authentication. The problem is that it have some conflict with JFBConnect.

Maybe if you can clarify what variables i should expect when FB or G+ or other social network send me after redirection, i can add it to my own oauth2 server.

Let me know if you need live access to see how it works.
The topic has been locked.
Active Subscriptions:

None
The topic has been locked.
Active Subscriptions:

None
10 years 1 month ago #58140 by matagu
Another thing, i'm using a plugin for my own users and i call onUserAfterSave to save my own variables in my own tables. But when i register with facebook seems that onUserAfterSave is not called.. any ideas how to fix this?
The topic has been locked.
Support Specialist
10 years 1 month ago #58143 by alzander

The problem is that it have some conflict with JFBConnect.

What is the conflict? I'm sure I'm asking a lot of questions, but this just isn't a question we've had before. If you're using JFBConnect for authentication, then we should be setting up all the details we need from our components/com_jfbconnect/libraries/provider files. Then, the social network should be using the callbacks that go into our extension.

If you're performing the authentication, then the callback should point to your directory. I'm not sure what mix of the 2 you are doing, but it sounds like you should either authenticate with your library or ours, not a combination of the two.

Maybe if you can clarify what variables i should expect when FB or G+ or other social network send me after redirection, i can add it to my own oauth2 server.

We use the Joomla OAuth2 library for most of our authentication process. We separated them out into our /libraries/authentication directory because we needed them to work with Joomla 2.5, but you can see the full Oauth code there. I don't think there's anything out of the ordinary that we try to setup.

Another thing, i'm using a plugin for my own users and i call onUserAfterSave to save my own variables in my own tables. But when i register with facebook seems that onUserAfterSave is not called.. any ideas how to fix this?

When we create the user, we use the JUser::save() function. It's all in our /models/loginregister.php file. The save() function is from core Joomla and triggers those plugin events. We don't have control over them. Can you test if doing a normal JFBConnect registration calls those events? My guess is that something in the code you're working with is redirecting the user or altering the code flow somehow to prevent the trigger, but it's difficult to tell.

In general though, we haven't heard of any issues with the onUserAfterSave event being triggered, and many extensions rely on it, so we would have heard about it.

I hope that helps explain some more.

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

None
10 years 1 month ago #58148 by matagu
Thanks for your support, i really appreciate. Sorry i login with different account because twitter login is not working.

I sorted last issues but now i have a problem with EasySocial, when i register using facebook and try to login receive this mysql query issue:

```
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR `a`.`id` NOT IN (SELECT `category_id` FROM `#__social_clusters_categories_' at line 1 SQL=SELECT DISTINCT `a`.* FROM `#__social_clusters_categories` AS `a` LEFT JOIN `#__social_clusters_categories_access` AS `b` ON `a`.`id` = `b`.`category_id` WHERE `a`.`type` = 'event' AND `a`.`state` = '1' AND (`b`.`profile_id` = OR `a`.`id` NOT IN (SELECT `category_id` FROM `#__social_clusters_categories_access`)) ORDER BY `a`.`ordering`
```

I think its related because easysocial user is not created or something like that. I have all plugins activated.
The topic has been locked.
Support Specialist
10 years 1 month ago #58154 by alzander
If you go into the EasySocial user manager, is the user there? I'm not sure what that error means as it's completely within EasySocial. That query isn't run by us and I really don't know what's it's trying to do. There's definitely an issue since the profile_id isn't being specified, but I don't have any good answers for why it's failing.

I'd try to authenticate with JFBConnect 'normally' and see if you have that issue. If not, it should help point you toward the integration you're doing and where to look.

Thanks,
Alex
The topic has been locked.