Closed mozi22 closed 11 years ago
Has you changed the default "base_url" config value on config/hybridauthlib.php ?
The value must be '/hauth/endpoint'
yes it is set to '/hauth/endpoint'.
Can you log the value for $config['base_url'] inside the lib?
For simplicity, change the function __constuct of libraries/hybridauthlib.php with this one:
function __construct($config = array())
{
$ci =& get_instance();
$ci->load->helper('url_helper');
log_message('info', 'application.libraries.HybridAuthLib.__construct: base_url(pre)="'.$config['base_url'].'"');
$config['base_url'] = site_url((config_item('index_page') == '' ? SELF : '').$config['base_url']);
log_message('info', 'application.libraries.HybridAuthLib.__construct: base_url(post)="'.$config['base_url'].'"');
parent::__construct($config);
log_message('debug', 'HybridAuthLib Class Initalized');
}
And copy here the results from the log.
I was not able to understand the log it was filled with a lot of content. so I just echoed the value in the lib file constructor which you asked me to update above.
I put these lines.
echo $config['base_url']; exit();
and it gave me this url
Are you using the query strings? (Value of $config['enable_query_strings'] inside config/config.php)
yes I am using query strings.
For now, HybridIgniter is not supporting query strings, I'm sorry.
I've created a new milestone to make this to work.
Until then, you can configure your full URL to the endpoint inside config/hybridauthlib.php and comment out the line inside libraries/hybridauthlib.php:
//$config['base_url'] = site_url((config_item('index_page') == '' ? SELF : '').$config['base_url']);
so if I set $config['enable_query_strings'] to false then it will work fine ?
I hope :)
you're right i set it to false it worked but it was giving some other error . Error authenticating user. Can't we do something about the $config['enable_query_strings'] I really want to use this :(
If you need to use query strings, make the modificacions indicated in my previous comment:
Configure your full endpoint URL inside config/hybridauthlib.php:
'base_url' => 'http://localhost/php/ci2/index.php/hauth/endpoint',
Comment out the line inside libraries/hybridauthlib.php:
//$config['base_url'] = site_url((config_item('index_page') == '' ? SELF : '').$config['base_url']);
ok that worked fine thnx. Just one last thing. Can you tell me why it is giving Error authenticating user ?
Possibly it's caused by a misconfiguration of the credentials for the social provider you are using.
its working thanks alot .
You're welcome.
Ups, closed by error.
hey can you help me plz I've got stuck again :)
its giving me "Hybriauth configuration error" and it is giving me the error at this line.
$this->load->library('HybridAuthLib');
I think it was due to the log folder. I didn't uploaded the log folder as I uploaded it. It started working fine
@andacata I am trying to login but it keeps saying "User profile request failed. Most likely the user is not connected to the provider and he should to authenticate again."
I tried redirecting the script but it generates a loop. Why is this happening and it works fine sometimes but sometimes it keeps giving this error.
If you are having connection/login problems, you need to test your configuration with a simple HybridAuth installation (without CodeIgniter) to isolate the problem.
Hey I am trying to integrate hybridigniter to my site.I've got this problem where it redirects me to the wrong endpoint url.
http://localhost/php/ci2/?index.php/hauth/endpoint&hauth.start=[provider]&hauth.time=[time]
This is the wrong url. Now I manually changed the url to
http://localhost/php/ci2/index.php/hauth/endpoint/?hauth.start=[provider]&hauth.time=[time]
and it worked.I replaced & with /? and removed ? before index.php.
So i just wanted to ask what settings should I change to make hybridigniter redirect me to this correct url instead of the above one.