[keycloak-dev] keycloak-js in a microfrontend architecture

Tomasz Prętki tomasz.pretki at dgt.eu
Mon Oct 14 06:44:34 EDT 2019


Hi there!



I'm trying to investigate using keycloak-js adapter in a microfrontend architecture. More specifically the single-spa ( https://single-spa.js.org/ ) solution. I would like to secure each microfrontend with it's own Keycloak client, because I want to deploy microfrontends separately too and have access to the Keycloak's context from each microfronted as well.

In the single-spa environment I am facing a redirect loop, because keycloak-js doesn't like more than one instance. I'm trying to init one instance, get redirected to Keycloak's login page and after successful login, trying to init another instance. Now the redirect loop occurs.



What is your opinion about this? How to achive this without compromising security? Any suggestions?

Tomasz Prętki



More information about the keycloak-dev mailing list