donjakobo / A3M

A3M - Bootstrapped - A CodeIgniter OpenID/Oauth boilerplate library utilizing Twitter Bootstrap UI
Other
107 stars 53 forks source link

CI3-beta + Hybrid #111

Closed jtarbox closed 8 years ago

jtarbox commented 10 years ago

I'm getting a similar error as what someone is in the second part of issue #109.

In effect, this does not look like it ever worked.

It was sitting at the Connect_end page doing nothing. This is with the included .htaccess file. With some debugging I see the url params I'm passing in $_GET, but Connect_end is replacing _GET with _RESPONSE and destroying the parameters.

After I changed it to $_RESPONSE = $_GET, the controller Connect_end.php is getting an error about the logger not being found. Did some troubleshooting and notice that the controller is not loading the Hybrid_auth_lib at all, which is what initializes the system. Copied this from Connect.

After I fixed this it begins to process further. Now each provider I've tried (steam, google, facebook, yahoo, and twitter) is getting a non-object error. In looking, line 85 of Connect is trying to lookup my new connection and get the user_id for it, but as the insert is in the else part of this if, it fails because the object is null.

I changed it to save the result from the Account_providers_model->get_by_provider_uid() call first, then use !is_null() on it for the if logic, then in the if logic for true, I set $user to $row->user_id at that point. This has gotten some providers to work, but Google is being it's own pain.

jtarbox commented 10 years ago

It seems the OAuth1 component of Yahoo is just not working. I delved it a bit, but it's getting into parts of Hybrid that I'm not comfortable with, and Yahoo isn't worth it.

A PHP Error was encountered Severity: Notice Message: Undefined index: oauth_token Filename: OAuth/OAuth1Client.php Line Number: 84

Backtrace: File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/thirdparty/OAuth/OAuth1Client.php Line: 84 Function: _exception_handler

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/Provider_Model_OAuth1.php Line: 109 Function: requestToken

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/Endpoint.php Line: 138 Function: loginBegin

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/Endpoint.php Line: 52 Function: processAuthStart

File: /home/content/34/10103834/html/dev/application/controllers/account/Connect_end.php Line: 61 Function: process

File: /home/content/34/10103834/html/dev/index.php Line: 274 Function: require_once

A PHP Error was encountered Severity: Notice Message: Undefined index: oauth_token_secret Filename: OAuth/OAuth1Client.php Line Number: 84

Backtrace:

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/thirdparty/OAuth/OAuth1Client.php Line: 84 Function: _exception_handler

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/Provider_Model_OAuth1.php Line: 109 Function: requestToken

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/Endpoint.php Line: 138 Function: loginBegin

File: /home/content/34/10103834/html/dev/application/third_party/Hybrid/Endpoint.php Line: 52 Function: processAuthStart

File: /home/content/34/10103834/html/dev/application/controllers/account/Connect_end.php Line: 61 Function: process

File: /home/content/34/10103834/html/dev/index.php Line: 274 Function: require_once

StorytellerCZ commented 10 years ago

I think that the Yahoo provider is not working in Hybrid, so we'll have to fix it there.