Javascript Adapter Logout multiple tabs issue

We use the javascript adapter to secure our SPA using Keycloak 12.0.4 release and we have an issue with logout if multiple tabs are used.
What happens:

  • User opens the app, is redirected to login, returns to the app - all fine
  • User opens a new tab, some magic redirects (without user interaction) happen in the background, user is logged in in the new tab as well - perfect
  • User logs out (we call the logout function of the Javascript adapter), he gets redirected to the login screen - expected behavior
  • In the other tab now on its next click the access token will no longer be send to our backend (Keycloak Spring Security Adapter in use) - unclear why this is the case because we set checkLoginIframe to false - can someone explain?
  • He gets redirected to login - ok
  • But now the strange part:
    – If user logs out in one tab and logs in again directly (this usually happens if refresh token has expired) he is logged out in the other tab as well upon his next click but instead of reusing the existing keycloak session he is again presented the login screen.
    – He can login here again but the other tab will be invalid again and make a logout on next click
    – So user is forced to close all its tabs up to one remaining.
    – Is this a bug or misconfiguration?