# Keeping user logged in

**URL:** <https://forum.keycloak.org/t/keeping-user-logged-in/5776>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [November 5, 2020, 4:25am UTC](https://forum.keycloak.org/t/keeping-user-logged-in/5776 "2020-11-05T04:25:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luffyyy](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@Luffyyy](https://forum.keycloak.org/u/Luffyyy)\
**Post date:** [November 5, 2020, 4:25am UTC](https://forum.keycloak.org/t/keeping-user-logged-in/5776/1 "2020-11-05T04:25:07Z")

</div>

Hello, I’m interested in using Keycloak for users to log in to our site.

Something I just cannot find any information about after searching long, is how should I keep the user logged in? I tried **[keycloak-nodejs-connect](https://github.com/keycloak/keycloak-nodejs-connect)** and that stores a session instead of a cookie which means that if a user closes the browser and returns to the site they get logged out which surely wouldn’t be ideal user experience.

Would be great to get an advice regarding that, thanks.

---

<div class="post-metadata">

**Author:** ![sbernhard](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@sbernhard](https://forum.keycloak.org/u/sbernhard)\
**Post date:** [November 5, 2020, 10:07pm UTC](https://forum.keycloak.org/t/keeping-user-logged-in/5776/2 "2020-11-05T22:07:14Z")

</div>

use technologies like openid connect or saml which is supported by keycloak. than you have true Single Sign On.
