Authentication management web app

Hello guys,

We are using Keycloak for our project. We have a front-end in VueJS. we can integrate the keycloak js adapter into it with one realm and one specific client. We ask the user to login when our view app is instantiated with one realm and then the user provides its credentials and he is back to the application.

What I want also to know if it’s possible to initialize Keycloak in a later stage with a different realm / client. For example the user can consult some pages without logged in and for specific route, the system ask him to log in to a specific realm ?

To rephrase, is it possible to have one SPA protected by different realms for different path in the application ?

It’s not possible give the current keycloak js adapter, unless you were to do some customization to initialize the adapter each time a different part/path of the SPA loads.