-
By Developer mode, I mean I am developing a local web application, but my BFF server is running remotely as are the Keyvloak service and of course, the resource service. My all works fine once it is deployed to the server, but local development has been a no-go so far. I have tried multiple ideas of running nginx locally to unify the host origin for nealry all services (besides Keycloak). Keycloak is configured to redirect to the BFF server using its hostname, so I lose cookie information on the last leg of the OIDC dance. I'm wondering if there are methods of developing locally using BFF which some developers are successfully (and hopefully - painlessly) using to be able to develop and test without having to deploy client code to the server. I don't have the option of running all of the services I need locally in containers. Is there a mechanism to generate a token client-side - programmatically? I realize this isn't secure, but I'm talking about a dev environment. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Imagine you are running your Docker container behind a remote host URL (like baeldung.example.org) with your Keycloak service at keycloak.example.org. Is there some means of running the React-UI locally in such a manner that it can use the remote host to perform its non-frontend functionality? The problems I run into are related to cookie issues caused by origin mismatch between my localhost and the bff endpoints. |
Beta Was this translation helpful? Give feedback.
That's precisely the purpose of the reverse proxy. The BFF's session cookies are, and should remain,
SameSite
. Serving both the UI and the BFF with the same origin (a reverse proxy) ensures that requests satisfySameSite
policies.From the section "3.1. System Overview":
So, when "running the React-UI locally", you should either: