Issues with Google and Twitter authentication

Issues with Google and Twitter authentication

Facebook authentication works fine with Joomla/JomSocial, but both Google and twitter has issues.

Google gives this error "Cannot use a stream transport when fopen() is not available or "allow_url_fopen" is disabled." We have fopen disabled for security reasons. Is there anyway to use curl instead?

For Twitter, it is not auto logging in users when signed up for the first time. It always redirects to the registration page. How to enable Twitter to auto login similar to Facebook?

yasmagic
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Issues with Google and Twitter authentication

For Twitter, it is not auto logging in users when signed up for the first time. It always redirects to the registration page. How to enable Twitter to auto login similar to Facebook?

This isn't possible. Twitter does not return the user's email address so JFBConnect has to take the user through a mini-registration process. In the JFBConnect configuration area, you can disable other fields (name, password, username) so that the registration only asks for the user's email address while the other details are imported or automatically generated. The user will need to go through some flow to get their email address though.

Google gives this error "Cannot use a stream transport when fopen() is not available or "allow_url_fopen" is disabled." We have fopen disabled for security reasons. Is there anyway to use curl instead?

JFBConnect always tries to instantiate cURL for authentication. The other transport options have many issues, as you're seeing. Can you try setting the "Enable Debug Mode" option in the JFBConnect -> Configuration area to 'Yes'. That may display more details as to why cURL isn't being used or other errors that may be occurring during the authentication process.

Thanks,
Ale

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23825 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Issues with Google and Twitter authentication

Thank you. We are still troubleshooting cURL issue.

The FB related JavaScript code seem to have been repeated in all internal web pages after login. This should appear only on the logon page, and should disappear after user is  loggeded in. What do I need to do to make this happen?

Thanks!

yasmagic
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Issues with Google and Twitter authentication

Which Facebook Javascript code are you talking about the? The sdk.js file? Currently, we still leave that enabled on all pages as many of our other features rely on that code being present. I don't have an immediate suggestion on how to remove it. If it's critical, I'm sure we can help you make a minor code change which should prevent the code from being inserted if the user has logged in, but you'd need to test a lot to make sure it doesn't introduce other issues.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23825 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Issues with Google and Twitter authentication

Thanks Alex. This code repeats in all pages. We want to remove it after login if possible.

<script type="text/javascript">
 
  window.fbAsyncInit = function() {
    FB.init({version: 'v2.3',appId: '1XXXXX', status: false, cookie: true, xfbml: false});
FB.Event.subscribe('comment.create', jfbc.social.facebook.comment.create);
FB.Event.subscribe('comment.remove', jfbc.social.facebook.comment.remove);
FB.Event.subscribe('edge.create', jfbc.social.facebook.like.create);
FB.Event.subscribe('edge.remove', jfbc.social.facebook.like.remove);
  };
  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_GB/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>

yasmagic
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Issues with Google and Twitter authentication

Here's what I'd recommend trying:
1) Edit /components/com_jfbconnect/libraries/provider/facebook.php
2) Around line 301, you'll see:

Code:

public function onAfterRender()

    {

Right after that, add:

Code:

if (! (JFactory::getUser()->guest) )

   return;

That little bit of code will simply check if the user is logged in, in any way (Joomla credentials or any social network). If logged in, then all of the Facebook Javascript will not be inserted into page.

Some features that will no longer work for authenticated users if you remove that Javascript are:
* Email notification on new Facebook Comments
* Email notification on new Facebook Likes
* Connecting an existing account to Facebook

Please test and let us know how that goes. We'd really like to hear your feedback.

Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23825 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11505
Total Polls:
0
Total Posts:
48428
Posts today:
13
User Info
 
Total Users:
47477
Newest User:
ShariBridges2
Members Online:
4
Guests Online:
733

Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program