2

I'm trying to figure out how HybridAuth works. I've installed it on my server as per instructions, added my developer key for Facebook, Google etc, however when i go to the "Tiny Social Hub" example:

www.mysite.org/inc/examples/social_hub/login.php

and click "Sign-in with Facebook", i get redirected to:

www.mysite.org/inc/hybridauth/?hauth.start=Facebook&hauth.time=1362314218

Similar with "Sign-in with Google":

www.mysite.org/inc/hybridauth/?hauth.start=Google&hauth.time=1362314279

And i just see the directly listing of /inc/hybridauth/ which includes:

index.php
config.php
Hybrid/

What am i missing?

Mike Mike
  • 1,125
  • 3
  • 13
  • 19

2 Answers2

2

I was able to solve this. For anyone who might run into this problem, the fix was based on a response to the question Hybrid auth with Yii causing a redirect loop, specifically the following point:

Your base_url in configuration file "hybridauth.php" should be set to "/hauth/endpoint" i.e. it must point to the endpoint. If you have removed index.php through .htaccess then use "/index.php/hauth/endpoint".

I needed to adjust my base url from:

"base_url" => "http://mysite.org/inc/hybridauth/"

to:

"base_url" => "http://mysite.org/inc/hybridauth/index.php"

My guess is that the first url would work in most instances because index.php is usually the default directory page. Whereas I've configured Apache to use home.php on my server.

Community
  • 1
  • 1
Mike Mike
  • 1,125
  • 3
  • 13
  • 19
0

Assuming you're using Apache, another solution would have been for you to tell it to recognize index.php as an index file.

Add the following in the relevant /etc/(httpd|apache2)/sites.enabled/ or httpd.conf file

DirectoryIndex index.php

Or, assuming apache is configured to allow .htaccess files, simply create an .htaccess file and put the above line in there.

dagelf
  • 1,468
  • 1
  • 14
  • 25