Topic-icon Yahoo & VK Logins not working

Active Subscriptions:

None
9 years 4 months ago #60786 by Dayo
I have followed the steps for setting up Yahoo Login and the button shows up but clicking this just results in a 504 Timeout error. Are there additional steps to be taken for this to work? Facebook, twitter and google all work fine. I notice there is something on the yahoo site saying a project needs to be created but not sure if or how relevant that is.

With VK, the VK site shows a message stating that the app needs access etc but when you click "Allow" there is no further response until the whole thing times out. Again, there is a field in the VK setup about a callback URL that does not appear in the setup instructions so not quite sure what to put there since it does not accept the format of other callback urls as these have parameters and the VK setup does not accept any parameters.
The topic has been locked.
Support Specialist
9 years 4 months ago #60800 by mel
Replied by mel on topic Yahoo & VK Logins not working
Could you send me screenshots of your application set up for both of the VK.com and Yahoo apps in a PM?

Could you also send me a specific URL that I can see the login buttons enabled so that I can test the authentication myself and look at the developer console to get some clues? I don't see them enabled currently on your site.

Specifically for VK - I just double-checked my applications and logging in with VK.com. I do not have any redirect URI's set up and am able to log in just fine. Could you take a screenshot of your application set up in VK.com? Go into vk.com/dev > My Apps > 'Manage' for your App > Settings tab.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago #60805 by Dayo
Replied by Dayo on topic Yahoo & VK Logins not working
Sent.

As per my PM, it appears the issues I am facing is not on the provider's end but with any provider with a callback to "/index.php?option=com_jfbconnect&task=authenticate.callback". Only Twitter does not make such a call and is the only reliable one working for me.
The topic has been locked.
Support Specialist
9 years 4 months ago #60815 by mel
Replied by mel on topic Yahoo & VK Logins not working
The URL you posted above is from JFBConnect and it's necessary during the authentication process. When that URL is hit after a user logs into a social network, that's when JFBConnect will do a lot of communication to that social network to get info about the user, possibly pull their avatar and profile picture and setup their local user details based on the Social Profile plugins you have enabled.

The first thing I'd recommend is to disable all Social Profile plugins you have enabled. That will remove a lot of calls to the social networks and could speed things up a bit. If so, re-enable them one by one and in the Profiles area of JFBConnect, slowly enable different fields or information to import.

The only other suggestions I have is to use the Disable the SSL Validation option in the JFBConnect configuration area. If your server can't validate the SSL certificates from the social networks, it can cause many retries.

Finally, if none of that helps, then you need to look at the server logs for what outgoing communication is happening and why it's failing. The possible reasons could be a firewall blocking connections, your hosting provider slowing down/throttling outgoing connections or something else. Unfortunately, that's not something we can help debug or diagnose as it's completely out of our hands how your server communicates with each social network.

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

None
9 years 4 months ago - 9 years 4 months ago #60820 by Dayo
Replied by Dayo on topic Yahoo & VK Logins not working
Thanks for getting back.

Can you help me by telling me which function in the component handles this call: /index.php?option=com_jfbconnect&task=authenticate.callback&provider=vk&code=abc&state=xyz.

It doesn't seem to be the callback function in /components/com_jfbconnect/controllers/authenticate.php as i would have thought.

This will help me start debugging in an effort to determine where the slowdown is exactly happening.

Thanks
Last edit: 9 years 4 months ago by Dayo.
The topic has been locked.
Support Specialist
9 years 4 months ago #60825 by mel
Replied by mel on topic Yahoo & VK Logins not working

It doesn't seem to be the callback function in /components/com_jfbconnect/controllers/authenticate.php as i would have thought.

Yes, this is the correct function. Why do you think it's not? If you're not getting there (in a timely manner), this could be part of the problem behavior.
The topic has been locked.
Active Subscriptions:

None
9 years 3 months ago - 9 years 3 months ago #60848 by Dayo
Replied by Dayo on topic Yahoo & VK Logins not working
Hi,

I added debug flags, die("message"), which were not triggered but I later found out this was with Facebook which does not use that callback function.

Okay, I am now only focussing on 3 providers: Twitter, Facebook and Google.

The status of each is as follows.

Twitter: No Issues at all.
Facebook: Ultimately works but very slow. Takes about 30 seconds to complete.
Google: 504 Timeout error 99 times out of 100.

Facebook does not use the callback function and leaving this aside for now.

Twitter does use this function but works perfectly well. Google, and presumably, Yahoo, VK etc, all use this but invariably timeout.
The delay experienced with the others only happen AFTER this callback function is called.

So, if when i add a 'die("message")' flag to the beginning of the callback function and click the button, it is hit immediately for Twitter, Google, Yahoo, VK etc. So the issue is not the provider authenticating and returning to my site but with what happens afterwards while running the callback function for the other providers apart from Twitter.

By moving the "die" flag down the function code, I have found that the delay kicks in while running "$provider->client->authenticate();".
Tracking through the code led me to the authenticate function in "/components/com_jfbconnect/libraries/authentication/oauth2base.php"

A "die" flag at the beginning of that function is called immediately, so no delays up to calling that function and the delay comes in around Line 87 when running "$response = $this->http->post($this->getOption('tokenurl'), $data);"

A look at the developer console shows that a GET request of the form:

"accounts.google.com/o/oauth2/auth?respon...approval_prompt=auto"

The delay seems to happen in waiting for a response to this call.

Actually, when I make that request directly into my browser I end up waiting forever. (I know this can't handle it perhaps, but expect some immediate error to show that the provider has received and perhaps rejected the browser call).

Wonder whether you can give me some insights on what to further look into given this information.
The interesting thing is why this doesn't affect Twitter given that it runs through the same functions. Facebook is clear as it uses a different approach. Is there something to change with the affected providers to make them consistent with Twitter's outcome?
Last edit: 9 years 3 months ago by Dayo.
The topic has been locked.
Support Specialist
9 years 3 months ago #60854 by alzander
If I try to call that URL in my browser (the exact one you posted, no changes), I get an immediate 400 error from Google.

Are you sure there's no restriction on your home or service access to those URLs? That call is trying to do exactly what you do in the browser.. a GET request with some data in the URL parameters. I'm not sure why Google or the others would be so slow as obviously they handle many, many requests per minute. It seems like something is missing. Unfortunately though, you debugged it down to the exact call and as you can see, there's not much we can do in JFBConnect to speed that call up. It's a matter of the underlying server to get the results.

As for Twitter, it simply uses a different URL and older OAuth mechanism. The goal is the same: requesting some data about the user and getting the authentication token. I don't think the difference is in the method Twitter uses, just that whatever is slowing things down affects google.com or vk.com and not twitter.com

I hope that helps with more details, but unsure what more we could do from here.

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

None
9 years 3 months ago #60861 by Dayo
Replied by Dayo on topic Yahoo & VK Logins not working
Hi Alex,

Thanks for taking a look. I also get an instant 400 error with the posted url and I believe this is because the url is invomplete and the "client_id=12345.mypublickey" and "www.example.com" parameters are not "real" values. I will PM you a "real" version if you don't mind.
The topic has been locked.
Support Specialist
9 years 3 months ago #60865 by alzander
When I click the link in your PM I get an immediate 400 error as well.

Are you seeing the link you sent in the email go slower? If so, try testing both while logged into Google and when not logged into Google to see if there's any difference in the delay. Perhaps there's something with fetching your information or some other issue with the account that's attempting the authentication.

Still unsure what's happening, but we'll gladly continue to help investigating however we can.

Thanks,
Alex
The topic has been locked.