andacata / HybridIgniter

HybridAuth - CodeIgniter integration
139 stars 84 forks source link

Endpoint reached. Nothing happens #2

Closed brenjt closed 12 years ago

brenjt commented 12 years ago

I followed the instructions on the use. When I try to login via any provider at: www.mydomainname.com/hauth/login/twitter it loads a page saying:

HybridAuth
Open Source Social Sign On PHP Library. 
hybridauth.sourceforge.net/

It never works. I have valid api credentials for twitter and facebook but both load this page and nothing else happens. Any tips would be greatly appreciated.

My log says:

Hybrid_Provider_Adapter::login( facebook ), redirect the user to login_start URL. -- Array
(
    [hauth_return_to] => http://www.sitename.com/hauth/login/facebook
    [hauth_token] => 6vjglu8usmsjqsi74cku8o85j3
    [hauth_time] => 1335997302
    [login_start] => http://sitename.com/hauth/endpoint?hauth.start=facebook&hauth.time=1335997302
    [login_done] => http://sitename.com/hauth/endpoint?hauth.done=facebook
)

INFO -- 127.0.0.1 -- 2012-05-03T00:21:42+02:00 -- Enter Hybrid_Auth::redirect( http://sitename.com/hauth/endpoint?hauth.start=facebook&hauth.time=1335997302, PHP )
andacata commented 12 years ago

Hello, it happened to me a few days ago.

If you have dropped the "index.php" part of the CodeIgniter URLs via .htaccess, the "/index.php/" part must be prepended to the "base_url" path (file application/config/hybridauthlib.php).

The base_url will be: '/index.php/hauth/endpoint'

I've commited a change with a comment with it.

Best regards.

brenjt commented 12 years ago

Doing now it says error authenticating user. No errors are in my log.

andacata commented 12 years ago

Can you check the HybridAuth log file? (application/logs/hybridauth.log)

brenjt commented 12 years ago

It's now working. Thank you for your help.

andacata commented 12 years ago

Sorry for not responding earlier, I was looking for some time to look more calmly. Can you explain which was the problem if it happens to someone else?

brenjt commented 12 years ago

There was an error in the config. Typo. I am having another issue. Once it logs me in I get to the endpoint with facebook and it gives me the facebook info. Code and provider name. But it doesn't give me the info for twitter. It's just blank. Also how do I get the user profile data once it goes to the endpoint?

brenjt commented 12 years ago

Also when I accept and login with twitter and return to login again nothing happens here: $service->isUserConnected(); it just asks me to authenticate again. It looks to me that $this->socialauthlib->authenticate($provider) is redirecting which I wouldn't think it should

brenjt commented 12 years ago
INFO -- 127.0.0.1 -- 2012-05-08T21:25:23+02:00 -- Hybrid_Auth initialize: check if any error is stored on the endpoint...
ERROR -- 127.0.0.1 -- 2012-05-08T21:25:23+02:00 -- Hybrid_Auth initialize: A stored Error found, Throw an new Exception and delete it from the store: Error#5, 'Authentification failed! facebook returned an invalide user id.' -- 
INFO -- 127.0.0.1 -- 2012-05-08T21:25:23+02:00 -- Enter Hybrid_Error::clearError()
andacata commented 12 years ago

It happened to me before, only with Twitter, but trying few minutes or a day later it works. I don't know if it's an HybridAuth or a Twitter problem. :-(

brenjt commented 12 years ago

It now says this when I try to login with facebook:

User has cancelled the authentication or the provider refused the connection.
andacata commented 12 years ago

HybridIgniter is a very little library to integrate HybridAuth into a CodeIgniter project, so the problems with the providers are related to the HybridAuth itself.

Try to create a simple PHP project with HybridAuth (without CodeIgniter) and test the config parameters and connections to isolate the problem.

tabacitu commented 11 years ago

Not being able to write into the log file also generates the "Error authenticating user." message. Just sayin'

ashishchauhan commented 9 years ago

I am also having the same issue now. When I go to the url http://example.com/hauth/login/Facebook the browser display the 'Error authenticating user' error message. Also there is nothing in my log file. Please help.

khalid11 commented 9 years ago

I am also having the same issue now. When I go to the url http://example.com/hauth/login/Facebook the browser display the 'Error authenticating user' error message. Also there is nothing in my log file. Please help.

sbangani commented 9 years ago

HybridIgniter seems to have problems and outdated, I am trying to setUserStatus but it not allowing me
I am using codeigniter framework