I’ve recently integrated hybridauth to my yii app. It was working well until I found that sometimes (don’t know when, seems to be random) It gives me the (You cannot access this page directly error) with this callback url callback?hauth.start=Facebook&hauth.time=some_int_value
I’ve tried anything I’ve found on google about this issue but it’s not helping.
I must specify that I am using hybridauth on a subdomain. I’ve tried every possible site url on the facebook’s app page and it is still giving me that error.
After further investigation I’ve found out that all end in the processAuthStart() method from Endpoint.php because it doesn’t find Hybrid_Auth::storage()->get( “hauth_session.$provider_id.hauth_endpoint” ).
Maybe the set was lost somewhere…
Does anyone know how to solve this ? It’s a bit frustrating that this error doesn’t appear every time. I really cannot see why this is happening.
I beleive hoauth is more of an integrated solution (with yii-user as a complementary ext). The maintainer is a bit more active than the others as well - check out hoauth on github.
If you require a good deal of flexibility, there is a good wiki article on integrating hybridauth without any extensions that is worth looking at.
Also to note, hybridauth as a library may have a shaky future based on the author’s twitter comments.
@Skylight Make sure that at login when you try to login with a provider, the “endpoint” is your hostname (the same thats configured in protected/config/haouth.php ‘base_url’).
If you var_dump $this->endpoint on {you ap}/protected/extensions/hoauth/hybridauth/Hybrid/Provider_Model.php at line 60, you must see the same hostname that launched the login, something like this www.skylight.com/index.php?r=user/login/oauth&hauth.done=Google
I have a website with this module. I set the redirect url in my google settings starting with www. If the url is without the www, the webpage shows but trying to login with google will give a redirect url error.
Is there a way to set hybridauth to always append www when a request url does not include it?
This should be an easy answer for some of you as a few seem to have this working ok (hopefully!)
I have been trying for a while to get this going with facebook, I’ve set up the facebook app and as far as I can see i’ve followed the latest set of installation instructions completeley. But when I come to log in with facebook (via mysite.com/hybridauth) I just get taken to a mostly blank page titled ‘Hybridauth Endpoint’ which just contains a link to the sourceforge site.
It seems I must be stupidly missing a step somehow but I cant figure it out… help please
You will need to incorporate a widget into your login view that will take you through the OAuth flow. The widget is documented in the installation guide. You can’t just do it directly