mariovalney/laravel-keycloak-web-guard

[Keycloak Error] It was not possible to load OpenId configuration:

Closed this issue · 4 comments

[Keycloak Error] It was not possible to load OpenId configuration: cURL error 35: error:1408F10B:SSL routines:ssl3_get_record:wrong version number (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://localhost:8080/auth/realms/master/.well-known/openid-configuration

Sounds like a problem to connect Laravel server with Keycloak.

Hi Ryan.
Did you fixed it? Can I mark as resolved?

I am also experiencing this issue.

I've installed and configured Vizir/laravel-keycloak-web-guard as per the docs, added it to my web routes as a guard and am met with this error.

In case someone else runs into this problem, this is how I resolved it:

Problem

This is due to the fact that my Laravel app as well as my Keycloak instance are (both) running on separate docker containers. The env value for "KEYCLOAK_BASE_URL" could therefor not resolve from the Laravel app.

How I fixed it

Both of these systems, my Laravel app and my Keycloak instance, are running on my development PC so I set the KEYCLOAK_BASE_URL to a value that could be located from the Laravel app. The URLs I used to connect to them are as follows:

In order for the Laravel app to locate the Keycloak instance I changed the KEYCLOAK_BASE_URL value to refer to my host machine's IP directly, e.g.:
KEYCLOAK_BASE_URL=http://1.2.3.4:8080/

HTH

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.