Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A problem I've had trying to do this for local dev is that the DNS name of the Keycloak server is "keycloak" inside of the Docker network, but "localhost" from the the outside. The user's browser will be redirected to localhost (since it's outside of the Docker network) but then there is a mismatch between hosts (it expects "keycloak" not "localhost") when it comes to an API server verifying the token.

Anyone figured this out?



I haven't tried this, but could you modify your /etc/hosts file (or analogous file on whatever operating system) to have `keycloak` as a valid hostname on your local computer? So that both within the docker container and in your host computer, `keycloak` was the hostname of the keycloak server?


Always an option, but I dislike changing global settings on the system. It makes it harder to hop between projects and it's slower when onboarding.


You need to configure the "client" in keyclock that corresponds with you front-end.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: