Unable to invalidate user session using keycloak-js

Hello,

I’m having a problem to logoff when running multiple clients. I have some applications running in the same realm, but with different technologies. The first is a React app using a “Portal” client ID and the second is a Java spring application using “Incentives” client ID. After starting a impersonated session, I’m able to access both clients (they have different URL’s), the problem starts in the logoff scenario.

If I’m navigating on “Incentives” client and perform a logout, my KC adapter invalidates entire user session (expected behavior), invalidating “Portal” session too.

If I’m navigating on “Portal” client and perform a logout, only this client is invalidated, being possible to continue using “Incentives” on the user session.

I was unable to find some related info, since the JS lib have a few information about this. Anyone had a similar issue?

I’ve tried all keycloak-js version since v4.