Open githubsrinath opened 8 years ago
The composer file looks fine. Let's check something: add the following code between the lines 244 and 245 of OAuthController.php:
error_log ('provider is:'.print_r($this->_provider,1));
With that in place, try to login again using the facebook oauth. Then, check your error log. Hopefully you will see something like: provider is:League\\OAuth2\\Client\\Provider\\Facebook Object....
Does your error log look like that or is it different? If it is different, what is the first line of that "provider is:" log?
I ran with the additional debug message. But no changes in the log though!
Here is the log.
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #13 /home/jalsa/public_html/uf/index.php(424): Slim\\Slim->run()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #12 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Slim.php(1302): UserFrosting\\UserSession->call()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #11 /home/jalsa/public_html/uf/userfrosting/middleware/usersession/UserSession.php(27): Slim\\Extras\\Middleware\\CsrfGuard->call()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #10 /home/jalsa/public_html/uf/userfrosting/middleware/CsrfGuard.php(51): Slim\\Middleware\\MethodOverride->call()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #9 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\\Middleware\\Flash->call()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #8 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\\Slim->call()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #7 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Slim.php(1357): Slim\\Route->dispatch()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #6 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #4 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/config-plugin.php(90): UserFrosting\\OAuth\\OAuthController->login()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #3 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/controllers/OAuthController.php(48): UserFrosting\\OAuth\\OAuthController->authenticate()
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #2 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/controllers/OAuthController.php(249): League\\OAuth2\\Client\\Provider\\AbstractProvider->getAccessToken('authorization_c...', Array)
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #1 /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(222): League\\OAuth2\\Client\\Grant\\AuthorizationCode->handleResponse(Array)
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] #0 /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Grant/AuthorizationCode.php(25): League\\OAuth2\\Client\\Token\\AccessToken->__construct(Array)
[Mon Mar 07 13:01:51 2016] [error] [client 106.51.16.88] Error in /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Token/AccessToken.php on line 38: Required option not passed: access_token
[Mon Mar 07 13:01:50 2016] [error] [client 106.51.16.88]
Regards Srinath
it looks like the code I gave you should have run (based on trace item #2
having the line number bumped by one). look around the error log or do a search for the text provider is:
and report back.
Sorry, here is the error_log
[07-Mar-2016 16:36:26 America/New_York] provider is:League\OAuth2\Client\Provider\Facebook Object
(
[graphApiVersion:protected] => v2.5
[scopes] => Array
(
[0] => public_profile
[1] => email
)
[responseType] => string
[clientId] => xxxxxx
[clientSecret] => xxxxxx
[redirectUri] => http://mydomain.com/uf/oauth/facebook/login
[state] =>
[name] =>
[uidKey] => uid
[method] => post
[scopeSeparator] => ,
[headers] => Array
(
)
[authorizationHeader] =>
[httpClient:protected] => Guzzle\Service\Client Object
(
[serviceDescription:protected] =>
[commandFactory:protected] =>
[resourceIteratorFactory:protected] =>
[inflector:protected] =>
[defaultHeaders:protected] => Guzzle\Common\Collection Object
(
[data:protected] => Array
(
)
)
[userAgent:protected] => Guzzle/3.9.3 curl/7.19.7 PHP/5.5.32
[config:Guzzle\Http\Client:private] => Guzzle\Common\Collection Object
(
[data:protected] => Array
(
[curl.options] => Array
(
[10065] => /home/jalsa/public_html/uf/userfrosting/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
[64] => 1
[81] => 2
)
)
)
.
.
.
.
.
.
[07-Mar-2016 16:36:26 America/New_York] Error in /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Token/AccessToken.php on line 38: Required option not passed: access_token
Array
(
[{"access_token":"xxxxxxxxx,"token_type":"bearer","expires_in":5152895}] =>
)
[07-Mar-2016 16:36:26 America/New_York] #0 /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Grant/AuthorizationCode.php(25): League\OAuth2\Client\Token\AccessToken->__construct(Array)
#1 /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(222): League\OAuth2\Client\Grant\AuthorizationCode->handleResponse(Array)
#2 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/controllers/OAuthController.php(253): League\OAuth2\Client\Provider\AbstractProvider->getAccessToken('authorization_c...', Array)
#3 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/controllers/OAuthController.php(48): UserFrosting\OAuth\OAuthController->authenticate()
#4 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/config-plugin.php(90): UserFrosting\OAuth\OAuthController->login()
#5 [internal function]: UserFrosting\OAuth\{closure}('facebook')
#6 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#7 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Slim.php(1357): Slim\Route->dispatch()
#8 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#9 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#10 /home/jalsa/public_html/uf/userfrosting/middleware/CsrfGuard.php(51): Slim\Middleware\MethodOverride->call()
#11 /home/jalsa/public_html/uf/userfrosting/middleware/usersession/UserSession.php(27): Slim\Extras\Middleware\CsrfGuard->call()
#12 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Slim.php(1302): UserFrosting\UserSession->call()
#13 /home/jalsa/public_html/uf/index.php(424): Slim\Slim->run()
#14 {main}
Thanks.
hmm. the methods being called in /vendor/league/....
don't seem to be up to date with the current library. try running composer update
also, be sure to remove your api credentials before posting in a public forum. I caught it and removed it for you this time
Hi,
Thanks for the masking the credentials ( sorry about that).
Well, I did composer update.
$ composer update
Warning: This development build of composer is over 30 days old. It is recommend ed to update it by running "/usr/local/bin/composer self-update" to get the late st version.
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/polyfill-mbstring (v1.1.0)
- Installing symfony/polyfill-mbstring (v1.1.1)
Loading from cache
Writing lock file
Generating autoload files
Still same error persist. :(
[09-Mar-2016 21:49:03 America/New_York] Error in /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Token/AccessToken.php on line 38: Required option not passed: access_token
Array
(
[{"access_token":"CAAYoPk5ZBHgEBAJWR7D3yIYyU0QEz5QvTBxAgXAZAPPGrKxvyR8mjmNOIW5ILHEhZB4lhZBVeRBqAk4kZBNPtibGUQ8LvGn6gcZAbI5tLnZCy0Pf5ZC0QYJVZBvcTViDdbi85YNLBHZAdAUkt1xtltZCpi9LdWSTN6ZCN64aEBbVkd5Aw7TZAPV06fFStvSYTOLLnCtwhE4meRZA7ZCEAZDZD","token_type":"bearer","expires_in":5183999}] =>
)
[09-Mar-2016 21:49:03 America/New_York] #0 /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Grant/AuthorizationCode.php(25): League\OAuth2\Client\Token\AccessToken->__construct(Array)
#1 /home/jalsa/public_html/uf/userfrosting/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(222): League\OAuth2\Client\Grant\AuthorizationCode->handleResponse(Array)
#2 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/controllers/OAuthController.php(253): League\OAuth2\Client\Provider\AbstractProvider->getAccessToken('authorization_c...', Array)
#3 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/controllers/OAuthController.php(48): UserFrosting\OAuth\OAuthController->authenticate()
#4 /home/jalsa/public_html/uf/userfrosting/plugins/UserFrosting-OAuth/config-plugin.php(90): UserFrosting\OAuth\OAuthController->login()
#5 [internal function]: UserFrosting\OAuth\{closure}('facebook')
#6 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#7 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Slim.php(1357): Slim\Route->dispatch()
#8 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#9 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#10 /home/jalsa/public_html/uf/userfrosting/middleware/CsrfGuard.php(51): Slim\Middleware\MethodOverride->call()
#11 /home/jalsa/public_html/uf/userfrosting/middleware/usersession/UserSession.php(27): Slim\Extras\Middleware\CsrfGuard->call()
#12 /home/jalsa/public_html/uf/userfrosting/vendor/slim/slim/Slim/Slim.php(1302): UserFrosting\UserSession->call()
#13 /home/jalsa/public_html/uf/index.php(424): Slim\Slim->run()
#14 {main}
Hi,
After following the installation steps. i am unable to open http://mywebsite.com/uf/oauth/facebook/login
URL is replaced with http://mywebsite.com/uf/oauth/facebook/login?code=AQCKJNcCeEXMgz4U5xEBnjhZQ2QEgdzgYlPwMWk4qEd_Qyv804JlMDbQK2Li8ScEtb1ON7Sclc0eqeTw_YZYwwbHzTxRfW5YuGI64U-FnWQiQxOdBjL7bg8NK9SwlJQ7wCnOqQyGXJ9RAO-9cVGytSNFKwPp2uXpCTdoLIK1vsOK63LSKkLiG6d04SPJ0kgjsvaUElgH88LkgwDKNyVCsrskIi09Od4U6ND8PG-Xw1uYzJf_NlmMtE2wQBKxaP4LU_dobQTjiUMFnJAGDHGAPhkeLPMpZ3SZ9R-8t7mT6cvkF30xj9RZT7lHb38qQhx-rjQ&state=734773b275d8f5b6ccc4aee6365911fa#_=_
Webpage display 500 Server error.
I get following error in my php server error_log
I feel, something wrong with the composer.json file.
Could you please help me to provide correct version of composer.json for this plugin.
My existing composer.json is as follows:
Looking forward for your reply.
Many thanks. Srinath