[keycloak-user] Invinity loop while proxy angular2 devserver

Okie Othsam okie.othsam at gmail.com
Wed Feb 22 03:13:19 EST 2017


Hi,
I try to prepare a development environment and got a strange loop behavior.

I have build a docker scenario with a keycloak/postgresql container that is
behind a web server proxy container (tested Apache and nginx). The
webserver container proxy also to a local running node.js instance with
angualar2 devserver.

My sample angular app uses the javascript keycloak adapter and wrapped it
with a service.

If I run Angular devserver and keycloak without any proxy all works fine.
When I use the same servers (modified keycloak.json) behind the proxy, the
angular app runs after successful keycloak login in an endless loop. Every
second the site is reloaded - without any new login.

When I build a release from my angular app and deploy it to the webserver
all works fine. But this is not really an alternative because I want setup
an universal dev environment :-/

After days of debugging, imo there is a good chance for some race
conditions in Javascript adapter between the dynamic iframe and the angular
app or I do something essential wrong.

My question is now, have anyone here run a similar setup and use it without
any problems?

Currently my containers run with keycloak version 2.4.0.Final. As next step
I will update my setup to 2.5.1.Final and try to reproduce the behavior.

Kind regards
Eiko


More information about the keycloak-user mailing list