Topic-icon Login redirect losing subdomain

Active Subscriptions:

None
12 years 7 months ago #38112 by haibar
This is 100% related to posting www.sourcecoast.com/forums/jfbconnect/jf...esh-losing-subdomain, but I wasn't able to reopen the posting.

It works in FB flawlessly now. However, I still have the same problem under G+ (and I'm afraid it will just appear under further support - we're looking forward to Twitter).

Can you recommend the place in the code (see the previous ticket for the FB code) where we would update it for G+?

Thanks.
The topic has been locked.
Support Specialist
12 years 7 months ago #38122 by alzander
We close old posts after 45 days of inactivity to prevent them being resurrected from the dead.. :)

In your case, Facebook is actually the odd-man-out. For Google, Twitter, and others in the future, the code to do what you're looking for would be in the /components/com_jfbconnect/libraries/providers/google.php file. Around line 55, you'll see:
$this->auth->setOption('redirecturi', JURI::base() . 'index.php?option=com_jfbconnect&task=authenticate.callback&provider=google');
Update that JURI::base() how you did with Facebook.

One thing to note is that Google requires *every* possible callback URL to be defined in your Application. That was covered in the Google+ setup instructions (step 10). Please make sure you add all the subdomains possible for your site there or G+ authentication won't work for them.

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

None
12 years 7 months ago #38147 by haibar
Works like a charm... thanks!
The topic has been locked.
Support Specialist
12 years 7 months ago #38155 by alzander
That's what I like to hear! Glad that helped. Just so you know, we did investigate this quickly for the v5.2 release, but it will *not* be in that release. So you'll need to make a similar change when you upgrade. There will then be a similar change for Twitter that you'll need to do.

We're still investigating adding the check for a switched subdomain in a future release, or, at the least, we'll add code that you can modify in just one spot to make the change.

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

None
12 years 7 months ago #38584 by haibar
Just upgraded to 5.2 - works great - you need to remind users to clear CDN/CloudFlare/etc as older JS probably caused my initial concerns - everything is fine now.

One question had to do with the custom patch (see earlier parts of this thread) - I reintegrated into the google.php file... no problem there.

With regards to twitter.php, it's not as clear since I don't see a similar redirect ($returnBase) in the that file. Where would this patch go for Twitter.

Another question - slightly off topic from this thread... I want to migrate to EasySocial from JomSocial. I noticed that the EasySocial plugin wasn't installed (obviously) since I currently don't have it installed. Once I install EasySocial, what's the best way to install your EasySocial plugin?
The topic has been locked.
Active Subscriptions:

None
12 years 6 months ago #38603 by haibar
I just reinstalled JFBConecct to pick up the EasySocial plugin - it worked. However, I still can't see JFBConnect login icons on our frontpage (now easysocial) - I've opened a ticket with StackIdeas, but I'm not sure if it's a JFBConnect issues or EasySocial issue. I think ES since it was working fine under JomSocial before the switch. Comments?

Regarding my earlier comments, I still need some direction on the twitter.php hack. thanks.
The topic has been locked.
Support Specialist
12 years 6 months ago #38618 by alzander
The change for Twitter is similar to that for Google. Edit the /components/com_jfbconnect/libraries/provider/twitter.php file. Around line 30, you'll see:
$this->options->set('callback', JURI::base() . 'index.php?option=com_jfbconnect&task=authenticate.callback&provider=twitter');
Do your magic on that URL. I'm also going to try to make a new "getCallBackUrl" function in a future release so that you can edit the code in only one place for all providers. It'll make both of our lives easier :D

Just upgraded to 5.2 - works great - you need to remind users to clear CDN/CloudFlare/etc as older JS probably caused my initial concerns - everything is fine now.

Glad to hear it went (mostly) smoothly. A lot of work goes into trying to ensure that for everyone. As for CDN's, we do add a new query string to our Javascript so that it can be reloaded by the CDN. Some ignore that, depending on how aggressive they are.

Another question - slightly off topic from this thread... I want to migrate to EasySocial from JomSocial. I noticed that the EasySocial plugin wasn't installed (obviously) since I currently don't have it installed. Once I install EasySocial, what's the best way to install your EasySocial plugin?

Either re-install JFBConnect which will re-detect your configuration. We'll likely have v5.2.1 out in a week with some minor bug-fixes, if you want to wait till then. Of course, that means re-making the modifications.
Otherwise, you can unzip the component file you downloaded from here and install the EasySocial plugin manually from the /admin/install/packages/socialprofiles directory.

Just letting you know the above, even though you already got it installed.

However, I still can't see JFBConnect login icons on our frontpage (now easysocial) - I've opened a ticket with StackIdeas, but I'm not sure if it's a JFBConnect issues or EasySocial issue. I think ES since it was working fine under JomSocial before the switch. Comments?

JomSocial has some specific integration to automatically add our buttons when enabled. I chatted with the StackIdeas guys this weekend, and that is (hopefully) in the pipeline.. feel free to nudge them on how awesome that would be :) Until then, you'd have to edit their template files and add the buttons manually. I can help out with doing so if you'd like instructions.. but I don't know it offhand yet. Just let me know!

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

None
12 years 6 months ago - 12 years 6 months ago #38621 by haibar

JomSocial has some specific integration to automatically add our buttons when enabled. I chatted with the StackIdeas guys this weekend, and that is (hopefully) in the pipeline.. feel free to nudge them on how awesome that would be :) Until then, you'd have to edit their template files and add the buttons manually. I can help out with doing so if you'd like instructions.. but I don't know it offhand yet. Just let me know!


Yes - I would definitely appreciate the instructions. That would be helpful and I'll still ping the StackIdeas guys as well... that was something that JomSocial did well and they ought to follow that.

Also - SCLogin seems to not yet support EasySocial (as a registration component) - will you be providing an update? What should I do in the meantime... set it to plain Joomla instead of JomSocial?
Last edit: 12 years 6 months ago by haibar.
The topic has been locked.
Active Subscriptions:

None
12 years 6 months ago #38702 by haibar
I've managed to hack the template for the frontpage (unity and login views) of EasySocial. It's not perfect, but acceptable for now until they support it directly.

What about SCLogin - it seems to be a module that doesn't (yet) support EasySocial (in terms of the parameters for the registration settings).
The topic has been locked.
Support Specialist
12 years 6 months ago #38712 by alzander
Glad you hacked something in that works for you. My plan was to investigate how/where to do that today. If you don't like your solution, let me know what you did, and we'll gladly check to see if there's some better way to do it.

The SCLogin module should be updated in the v5.2.1 release of JFBConnect (next week) to add the EasySocial options.

Thanks,
Alex
The topic has been locked.