User still signed in after browser was closed 12 hours later

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.

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

1 Like

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.

1 Like

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

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. 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. :tada:

If you have any burning questions (or even casual curiosities!), feel free to drop them in this thread. 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