我使用dev version (2.0) of A3M for CodeIgniter为我的应用添加安全身份验证。 auth进程(使用HybridAuth 2.2.0-dev)似乎进展顺利,因为日志显示:
(
[hauth_return_to] => https://mywebsite.com/account/connect/Google
[hauth_token] => uhas9b51ajhlehkbo1fehj79t0
[hauth_time] => 1405629149
[login_start] => https://mywebsite.com/account/connect_end?hauth.start=Google&hauth.time=1405629149
[login_done] => https://mywebsite.com/account/connect_end?hauth.done=Google
)
但它会将我重定向到此网址的页面:
https://mywebsite.com/account/connect_end?hauth.start=Google&hauth.time=1405629255
有了这个内容:
HybridAuth
Open Source Social Sign On PHP Library.
hybridauth.sourceforge.net/
并未完成登录或帐户关联。我尝试将Google Developer Console中的redirect_uri
更改为'/account/connect_end'
和'/account/connect/Google'
,结果相同。我怎样才能连接它?
答案 0 :(得分:0)
好的,虽然它看起来像配置文件问题或错误,但这实际上是Web服务器中URL处理的问题。我将此规则添加到NGINX:
location / {
try_files $uri $uri/ /index.php;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?/$1 last;
}
}