# Session status iframe reports user is logged out

**URL:** <https://forum.keycloak.org/t/session-status-iframe-reports-user-is-logged-out/25681>\
**Category:** Miscellanaeous\
**Created:** [April 22, 2024, 10:16am UTC](https://forum.keycloak.org/t/session-status-iframe-reports-user-is-logged-out/25681 "2024-04-22T10:16:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgaiacs](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rgaiacs](https://forum.keycloak.org/u/rgaiacs)\
**Post date:** [April 22, 2024, 10:16am UTC](https://forum.keycloak.org/t/session-status-iframe-reports-user-is-logged-out/25681/1 "2024-04-22T10:16:41Z")

</div>

Hi,

I’m using Keycloak and the [Keycloak JavaScript adapter](https://www.keycloak.org/docs/latest/securing_apps/#_javascript_adapter) for a single page web application. I create and initiate the adapter following the documentation:

```auto
adapter = new Keycloak({
  url: ENV.APP.KEYCLOAK_URL,
  realm: ENV.APP.KEYCLOAK_REALM,
  clientId: ENV.APP.KEYCLOAK_CLIENT_ID,
});
adapter
.init({
  onLoad: "check-sso",
  silentCheckSsoRedirectUri: ENV.APP.KEYCLOAK_SSO_REDIRECT_URI,
  enableLogging: ENV.APP.KEYCLOAK_LOGGING,
})

```

Authentication is working. `adapter.login()` redirects to Keycloak that will redirect back to my single page web application. On the redirect back, Keycloak JavaScript adapter via the `check-sso` iframe will recognise that I’m authenticated and I’m able to print to the browser developer console the Keycloak user ID and token. The token looks good to me after checking on [https://jwt.io](https://jwt.io).

The problem is that for unknown reason, the Keycloak JavaScript adapter captures a “user is logged out” from the `check-sso` iframe after 1 minute despite the token still be valid for another 29 minutes.

I’m using the Keycloak JavaScript adapter wrongly?
