-
Not sure if it is right place to ask, but... I am currently working on implementing the Backend for Frontend (BFF) pattern as described in your article on Baeldung. I have a specific scenario where I am using Docker’s DNS for internal communication. Here is how the URI to auth in my security:
oauth2:
client:
provider:
myproject:
issuer-uri: http://auth:8998/realms/myproject
user-name-attribute: preferred_username
registration:
myproject:
provider: myproject
authorization-grant-type: authorization_code
client-id: myproject-spa
client-secret: ---actually-secret---
scope: openid, profile, email, roles, offline_access
com:
c4-soft:
springaddons:
oidc:
ops:
- iss: http://auth:8998/realms/myproject
authorities:
- path: $.realm_access.roles
aud: ""
... In this setup, the client attempts to login using the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You might add your dev machine hostname (the output of the Remember to update Keycloak configuration to use this hostname in |
Beta Was this translation helpful? Give feedback.
You might add your dev machine hostname (the output of the
hostname
command in git-bash) to theextra_hosts
in your docker-compose file(s) and use that for the URIs in your conf. Like that, thishostname
will be known by both docker containers and the browser you run your frontend into.Remember to update Keycloak configuration to use this hostname in
KC_HOSTNAME_URL
andKC_HOSTNAME_ADMIN_URL
.