thephpleague / oauth2-client

Easy integration with OAuth 2.0 service providers.
http://oauth2-client.thephpleague.com
MIT License
3.64k stars 751 forks source link

GenericProvider does nothing with "verify = false" option. #945

Open danardf opened 2 years ago

danardf commented 2 years ago

Hi everyone.

With my code, as in your exemple. The fact to use "verify" => false doesn't work I've got an error cURL error 60: Peer's certificate has an invalid signature

Your example shows verify = false. but no way. It doesn't care. It's like verify = true.

$provider = new \League\OAuth2\Client\Provider\GenericProvider([ 'clientId' => 'XXXXXX', // The client ID assigned to you by the provider 'clientSecret' => 'XXXXXX', // The client password assigned to you by the provider 'redirectUri' => 'https://my.example.com/your-redirect-url/', 'urlAuthorize' => 'https://service.example.com/authorize', 'urlAccessToken' => 'https://service.example.com/token', 'urlResourceOwnerDetails' => 'https://service.example.com/resource', 'proxy' => '192.168.0.1:8888', 'verify' => false ]); Any idea?

Franck

danardf commented 2 years ago

Hmmm I think I found where the issue comes from. Need to use a proxy. Without proxy, that means verify is not set.

That will be interesting to set this option without proxy. For any reason, we could use it without proxy.

FernandoVelcic commented 2 years ago

Hello I need the same option.

Thanks