beyondcode / herd-community

91 stars 1 forks source link

[Bug]: cURL error 60: SSL certificate problem: unable to get local issuer certificate #673

Closed jozeflambrecht closed 6 months ago

jozeflambrecht commented 7 months ago

Platform

Windows

Operating system version

Windows 11

System architecture

Windows

Herd Version

1.1.0

PHP Version

PHP 8.3

Bug description

When I use Laravel Socialite to authenticate a client app, I get this error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://example.test/oauth/token

I went into my php.ini (location C:\Users\jozef.config\herd\bin\php83) and put curl.cainfo ="C:\test\cacert.pem" Downloaded the file here: https://curl.haxx.se/ca/cacert.pem

I restarted the services, herd, my computer, still the same error.

Steps to reproduce

Use Laravel Socialite $globalUser = Socialite::driver('laravelpassport')->user();

Relevant log output

No response

sschlein commented 6 months ago

Do you use https for your local endpoint or Expose for the webhook redirect?

It would be great to learn more about your local setup and your local oauth domain to be able to reproduce the issue.

muhammadessam commented 6 months ago

Same error here i have done the same soultion with not hope to make it work

muhammadessam commented 6 months ago

image for me i have two main projects one for the front end uses vue and calls back some api endpoints on the back end i have tried a lot of solution but the main one is to change the php.ini cafile location with not luck to makeit work

jozeflambrecht commented 6 months ago

both the "client" and the "host/server" are on my local machine my .env of the client

LARAVELPASSPORT_CLIENT_ID=***
LARAVELPASSPORT_CLIENT_SECRET=***
LARAVELPASSPORT_REDIRECT_URI=https://client.test/auth/callback
LARAVELPASSPORT_HOST=https://host.test/

it does work on my production server, but not locally. I don't know if that answers your question..

jozeflambrecht commented 6 months ago

fixed in next release?

mpociot commented 6 months ago

GitHub seems to automatically close issues as soon as they get merged in master. I'll publish the update in the next hour 🙂

igormages commented 2 months ago

Some news about this issue ?

Logarithmique51 commented 1 month ago

Solution :

  1. Download the certificate file here
  2. Modify the value of curl.cainfo in your php.ini to and set the absolute path to the downloaded certificate.
  3. Restart you php serv