# User still signed in after browser was closed 12 hours later

**URL:** <https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962>\
**Category:** Get Help\
**Created:** [February 16, 2020, 4:09am UTC](https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962 "2020-02-16T04:09:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewgbex](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrewgbex/32/12751_2.png) [@andrewgbex](https://community.auth0.com/u/andrewgbex)\
**Post date:** [February 16, 2020, 4:09am UTC](https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962/1 "2020-02-16T04:09:05Z")

</div>

I have download the sample app for .net core 3.  
and created a tenant for it, to test this in isolation.  
When the user logs in and then closes the browser. No matter how long i wait, he never logs out. Or at least it appears that way.  
I have just run the app after maybe 12 hours and the user is still logged in.  
How can i prevent this happening.

I have tried adjusting the session time out by adding the following code:

services.AddSession(options =\>  
{  
options.IdleTimeout = TimeSpan.FromSeconds(1);  
});

But it made no difference at all.

---

<div class="post-metadata">

**Author:** ![rashid779939](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashid779939/32/27027_2.png) [@rashid779939](https://community.auth0.com/u/rashid779939)\
**Post date:** [February 16, 2020, 5:16am UTC](https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962/2 "2020-02-16T05:16:42Z")

</div>

The default session timeout is 3 days of inactivity and 30 days are of fore logout. You can get help from below mention post.

> [@How to expire the login session after 24hrs](http://community.auth0.com/t/how-to-expire-the-login-session-after-24hrs/13014):
>
> I have a SPA. I believe my application’s session is expired after a couple of hours of idleness. When the user tries to log back in, their credentials are cached and they login without having to retype their password. I would like auth0 to request the user enter their password again after 24hrs. How do I do that? I tried setting the API’s “Total Expiration (Seconds)” and “Token Expiration for Browser Flows (Seconds)” to 86400 (1 day), but the login is still cached after 1 day. What setting sh…

---

<div class="post-metadata">

**Author:** ![andrewgbex](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrewgbex/32/12751_2.png) [@andrewgbex](https://community.auth0.com/u/andrewgbex)\
**Post date:** [February 16, 2020, 8:06am UTC](https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962/3 "2020-02-16T08:06:07Z")

</div>

Thanks i tried the setting in the Tenant. It appears to do what i wanted. Strange though as the description says that it will time out after N minutes of inactivity. But it only works for me if i already closed the browser.  
If i set it to one min, and just wait with the browser open it does NOT time out. Only if i close it first then wait 1 min. Strange. But still does what i need, so i am happy.

Thank you for the link.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2020, 8:06am UTC](https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962/4 "2020-03-02T08:06:12Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 31, 2025, 5:59pm UTC](https://community.auth0.com/t/user-still-signed-in-after-browser-was-closed-12-hours-later/37962/5 "2025-01-31T17:59:05Z")

</div>

Hi team!

This is a heads-up that we’re hosting an [Ask Me Anything (AMA) session dedicated to Auth0 sessions, refresh tokens, and the Management API](https://community.auth0.com/t/feb-12-auth0-community-ask-me-anything-auth0-sessions-and-refresh-tokens/174853). Our product experts will be on hand **February 12, 2025, from 8 AM to 10 AM PST** to answer all your questions—no matter how basic or advanced they may be! You can submit your queries anytime from **now until February 11** , and we’ll provide detailed written answers during the live event.

This is a fantastic opportunity to learn best practices around session management, refresh token rotation, and the Management API. Plus, everyone who participates gets **points and a special badge** just for joining in on the fun. 🎉

If you have any burning questions (or even casual curiosities!), feel free to drop them in [this thread](https://community.auth0.com/t/feb-12-auth0-community-ask-me-anything-auth0-sessions-and-refresh-tokens/174853). We can’t wait to see what you’re working on and how we can help you optimize your Auth0 setup. See you there!

[Auth0 Community Ask Me Anything: Auth0 Sessions and Refresh Tokens](https://community.auth0.com/t/feb-12-auth0-community-ask-me-anything-auth0-sessions-and-refresh-tokens/174853)
