简体   繁体   English

Hybridauth身份验证失败

[英]Hybridauth authentication failing

I have moved a code repository using HybridAuth from a server to different one. 我已将使用HybridAuth的代码存储库从服务器移至其他服务器。 I configured all the login provider apps like Facebook/Twitter but after moving the code, none of the login seems to be working. 我配置了所有登录提供程序应用程序,例如Facebook / Twitter,但在移动代码后,所有登录似乎均不起作用。

This is what login.php in HybridAuth looks like: 这是HybridAuth中的login.php的样子:

$config = 'library/hybridauth/config.php';
require_once("library/hybridauth/Hybrid/Auth.php");

These files have a relative path from the Root directory as: library/hybridauth/config.php 这些文件在Root目录中的相对路径为:library / hybridauth / config.php

Infact, i access install.php like this : {domainName}/library/hybridauth/install.php 实际上,我这样访问install.php:{domainName} /library/hybridauth/install.php

I var_dump-ed the following line: 我var_dump-ed了以下行:

    // create an instance for Hybridauth with the configuration file path as parameter
    $hybridauth = new Hybrid_Auth( $config );
    var_dump($hybridauth);

and it is giving me an empty hybridauth object. 它给了我一个空的hybridauth对象。

object(Hybrid_Auth)#1 (0) {
}

Server logs are not helping as well.. Any suggestions ? 服务器日志也没有帮助。.有什么建议吗?

Debug Logs: 调试日志:

INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Auth::initialize()
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::initialize(). PHP version: 5.4.31
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::initialize(). Hybrid_Auth version: 2.1.2
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::initialize(). Hybrid_Auth called from: http://<DOMAIN_NAME>/login.php?provider=Facebook
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize. dump used config:  -- a:8:{s:8:"base_url";s:33:"http://<DOMAIN_NAME>/library/hybridauth/";s:9:"providers";a:10:{s:6:"OpenID";a:1:{s:7:"enabled";b:1;}s:3:"AOL";a:1:{s:7:"enabled";b:1;}s:5:"Yahoo";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:0:"";s:6:"secret";s:0:"";}}s:6:"Google";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:40:"<GOOGLE_APP_KEY>";s:6:"secret";s:24:"<GOOGLE_APP_SECRET>";}}s:8:"Facebook";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:16:"<FB_APP_KEY>";s:6:"secret";s:32:"<FB_APP_SECRET>";}}s:7:"Twitter";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:3:"key";s:25:"<TWTR_APP_KEY>";s:6:"secret";s:50:"<TWTR_APP_SECRET>";}}s:4:"Live";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:0:"";s:6:"secret";s:0:"";}}s:7:"MySpace";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:3:"key";s:0:"";s:6:"secret";s:0:"";}}s:8:"LinkedIn";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:3:"key";s:14:"<LINKEDIN_APP_KEY>";s:6:"secret";s:16:"<LINKEDIN_APP_SECRET>";}}s:10:"Foursquare";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:0:"";s:6:"secret";s:0:"";}}}s:10:"debug_mode";s:2:"no";s:10:"debug_file";s:40:"library/hybridauth/debug_file/debug_file";s:9:"path_base";s:61:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/";s:14:"path_libraries";s:72:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/thirdparty/";s:14:"path_resources";s:71:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/resources/";s:14:"path_providers";s:71:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/Providers/";}
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize. dump current session:  -- a:3:{s:37:"hauth_session.twitter.hauth_return_to";s:48:"s:40:"http://<DOMAIN_NAME>/login.php?provider=Twitter";";s:36:"hauth_session.twitter.hauth_endpoint";s:60:"s:52:"http://<DOMAIN_NAME>/library/hybridauth/?hauth.done=Twitter";";s:40:"hauth_session.twitter.id_provider_params";s:347:"a:5:{s:15:"hauth_return_to";s:40:"http://<DOMAIN_NAME>/login.php?provider=Twitter";s:11:"hauth_token";s:32:"8c8d4234e6dd0baadbf3ffc7a65b771f";s:10:"hauth_time";i:1408439081;s:11:"login_start";s:75:"http://<DOMAIN_NAME>/library/hybridauth/?hauth.start=Twitter&hauth.time=1408439081";s:10:"login_done";s:52:"http://<DOMAIN_NAME>/library/hybridauth/?hauth.done=Twitter";}";}
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize: check if any error is stored on the endpoint...
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize: no error found. initialization succeed.
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Auth::authenticate( Facebook )
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::authenticate( Facebook ), User not connected to the provider. Try to authenticate..
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Auth::setup( Facebook ) -- 
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::setup( Facebook ), no params given. Trying to get the sotred for this provider. -- 
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::setup( Facebook ), no stored params found for this provider. Initialize a new one for new session
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::setup( Facebook ). HybridAuth Callback URL set to:  -- http://<DOMAIN_NAME>/login.php?provider=Facebook
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Provider_Adapter::factory( Facebook )
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Provider_Model::__construct( Facebook ) initialized. dump current adapter instance: 

I would fire up something like Telerik's Fiddler to examine exactly what is going over the wire, as the debugging log is one removed from what you are actually sending and receiving. 我会启动Telerik的Fiddler之类的工具来检查线路上到底发生了什么,因为调试日志已从您实际发送和接收的日志中删除了。 At least then you could find out whether Facebook was contacted or not by your PHP code. 至少然后您可以确定您的PHP代码是否与Facebook联系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM