我正在尝试弄清楚 HybridAuth 的工作原理。我已按照说明将其安装在我的服务器上,添加了 Facebook、Google 等的开发人员 key ,但是当我转到“Tiny Social Hub”示例时:
www.mysite.org/inc/examples/social_hub/login.php
然后点击“使用 Facebook 登录”,我会被重定向到:
www.mysite.org/inc/hybridauth/?hauth.start=Facebook&hauth.time=1362314218
与“使用 Google 登录”类似:
www.mysite.org/inc/hybridauth/?hauth.start=Google&hauth.time=1362314279
我只看到 /inc/hybridauth/
的直接列表,其中包括:
index.php
config.php
Hybrid/
我错过了什么?
最佳答案
我能够解决这个问题。对于任何可能遇到此问题的人,修复是基于对问题 Hybrid auth with Yii causing a redirect loop 的回答。 ,具体有以下几点:
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".
我需要调整我的基本网址:
"base_url" => "http://mysite.org/inc/hybridauth/"
至:
"base_url" => "http://mysite.org/inc/hybridauth/index.php"
我的猜测是第一个 url 在大多数情况下都有效,因为 index.php 通常是默认目录页面。而我已将 Apache 配置为在我的服务器上使用 home.php。
关于php - HybridAuth "Tiny Social Hub"示例重定向到/hybridauth/?hauth.start=Facebook&hauth.time,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15185778/