IntuitDeveloper / OAuth2_PHP

PHP sample app for OAuth2
Apache License 2.0
37 stars 34 forks source link

SSL certificate problem: unable to get local issuer certificate #3

Closed curiousfreelancer closed 7 years ago

curiousfreelancer commented 7 years ago

PHP Fatal error: Uncaught Exception: SSL certificate problem: unable to get local issuer certificate in /Applications/MAMP/htdocs/OAuth2_PHP-master/OAuth_2/Client.php:186 Stack trace:

0 /Applications/MAMP/htdocs/OAuth2_PHP-master/OAuth_2/Client.php(86): Client->executeRequest('https://oauth.p...', Array, Array, 'POST')

1 /Applications/MAMP/htdocs/OAuth2_PHP-master/OAuth_2/OAuth2PHPExample.php(48): Client->getAccessToken('https://oauth.p...', 'Q011501220483w7...', 'https://ef0e5c5...', 'authorization_c...')

2 {main}

thrown in /Applications/MAMP/htdocs/OAuth2_PHP-master/OAuth_2/Client.php on line 186

@hlu2 Any help here would be much appreciated.

curiousfreelancer commented 7 years ago

I've added a PR #4 to resolve this issue

jfkhome commented 7 years ago

I am having the same issue. The 1.0A sample app turned off peer verification to avoid the error (according to the comment), which with oAuth 1.0a seemed to cause no problem for API calls, but with OAuth2 API calls are failing (I can get the token by turning off peer verification). Just wondering if this is not a problem coming from the new implementation of OAuth2 but existed under oAuth1 and everyone was just disabling peer verification (an unsecure solution).

ttodua commented 6 years ago

Solution - https://stackoverflow.com/questions/43245262/getting-github-source-with-curl-in-php