# Sessions never times out nor invalidates after shutting down the browser

**URL:** <https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [May 29, 2023, 9:42pm UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046 "2023-05-29T21:42:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![don-esteban](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/don-esteban/32/47574_2.png) [@don-esteban](https://community.auth0.com/u/don-esteban)\
**Post date:** [May 29, 2023, 9:42pm UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/1 "2023-05-29T21:42:40Z")

</div>

Hi community,

We have a Next.js app and need to add authentication/authorization. I started with Auth0 evaluation yesterday and probably missing the point completely. Please be patient.

I cloned the example and published the app unmodified here: [My app Next.js/Auth0 example app](https://my-app-zeta-nine.vercel.app). It’s [at GitHub too](https://github.com/don-esteban/my-app). Feel free and register and test.

**Issue: Sessions never time out nor invalidate after shutting down the browser.**

I checked [this community post](https://community.auth0.com/t/why-users-remain-login-after-the-inactivity-timeout/87161) unsuccessfully. All the settings simply do not change anything. Non-persistent sessions neither work.

I used Chrome, Firefox and Safari on macOS. A colleague checked on MS Windows.

The app has back button issues too, but I did not do much testing. I’ll address this in another post after more doing more research.

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 30, 2023, 6:29am UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/2 "2023-05-30T06:29:50Z")

</div>

Hey there @don-esteban !

Can you share a link to the example that you used in your implementation so we can help you better in troubleshooting this? Typically how we approach such situations is that in order to handle that most effectively and work with example maintainers directly we would like you to open a GitHub issue in the example repo.

Once that’s done please share a link to the issue you created so we can ping the repo maintainers. Thank you!

---

<div class="post-metadata">

**Author:** ![don-esteban](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/don-esteban/32/47574_2.png) [@don-esteban](https://community.auth0.com/u/don-esteban)\
**Post date:** [May 30, 2023, 8:17am UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/3 "2023-05-30T08:17:11Z")

</div>

> [@konrad.sopala](#):
>
> example repo

Hi @konrad.sopala.

Thanks for your reply. Sure I’ll do. But not quite sure, which repo/example you refer to. Probably this one: [https://github.com/auth0/nextjs-auth0/tree/main/examples/basic-example](https://github.com/auth0/nextjs-auth0/tree/main/examples/basic-example).

I could not locate the base-example in this repo. To be more precise. I did not refer to or used an example from any repo. I used/downloaded the example, better said starter app, one gets in the Dashboard → Applications → My App → Quick Start tab.

I used an unmodified copy of this download [here (deployed on Vercel)](https://my-app-zeta-nine.vercel.app/) and [here (public GitHub repo)](https://github.com/don-esteban/my-app).

Later (currently busy), I’ll download and test the basic example in the repo I mentioned above. If it reproduces the error, I’ll proceed as you proposed.

Anyhow, I’ll report progress or failure. Thanks.

---

<div class="post-metadata">

**Author:** ![don-esteban](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/don-esteban/32/47574_2.png) [@don-esteban](https://community.auth0.com/u/don-esteban)\
**Post date:** [May 30, 2023, 5:00pm UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/4 "2023-05-30T17:00:31Z")

</div>

Hi again. I reproduced the same behavior with the example/basic-example and I filed an issue. [Sessions never times out nor invalidates after shutting down the browser · Issue #1219 · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues/1219)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 31, 2023, 10:58am UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/5 "2023-05-31T10:58:31Z")

</div>

Perfect! Will ping the repo maintainers in a few minutes!

---

<div class="post-metadata">

**Author:** ![don-esteban](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/don-esteban/32/47574_2.png) [@don-esteban](https://community.auth0.com/u/don-esteban)\
**Post date:** [June 7, 2023, 6:46pm UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/6 "2023-06-07T18:46:59Z")

</div>

Thanks @konrad.sopala. The repo maintainers resolved this. [My comments there](https://github.com/auth0/nextjs-auth0/issues/1219#issuecomment-1581268727):

> Hi and sorry for the late feedback. Thanks. This resolves the issue. Especially the link to the docs was helpful! With that information, I could manage all session needs we have. I’m still confused about the (for me) not working dashboard configuration, but further reading/practice certainly will resolve this too. No additional help required for the moment. Thanks.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 12, 2023, 6:54am UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/7 "2023-06-12T06:54:26Z")

</div>

Perfect! Thanks for sharing!

---

<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:** [June 26, 2023, 6:55am UTC](https://community.auth0.com/t/sessions-never-times-out-nor-invalidates-after-shutting-down-the-browser/108046/8 "2023-06-26T06:55:07Z")

</div>

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