# Id token lifetime expiration doesn't end user session

**URL:** <https://community.auth0.com/t/id-token-lifetime-expiration-doesnt-end-user-session/64938>\
**Category:** Get Help\
**Tags:** id\_token\
**Created:** [June 23, 2021, 2:21pm UTC](https://community.auth0.com/t/id-token-lifetime-expiration-doesnt-end-user-session/64938 "2021-06-23T14:21:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkotsuka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dkotsuka/32/12778_2.png) [@dkotsuka](https://community.auth0.com/u/dkotsuka)\
**Post date:** [June 23, 2021, 2:21pm UTC](https://community.auth0.com/t/id-token-lifetime-expiration-doesnt-end-user-session/64938/1 "2021-06-23T14:21:33Z")

</div>

I want to understand what is id\_token lifetime is for.  
Basically, I need to enforce the user to proceed to log in again after some time, but I need to set different times for each application.

I tried for id\_token expiry time, but it didn’t work. The user continues with the active session even after the token lifetime has elapsed.

On the other hand, I got the effect by changing tenant settings, but that impacts all applications, which is not what I’m aiming for.

Should id\_token expiration enforces the session end?

---

<div class="post-metadata">

**Author:** ![sgo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgo/32/13789_2.png) [@sgo](https://community.auth0.com/u/sgo)\
**Post date:** [June 23, 2021, 4:40pm UTC](https://community.auth0.com/t/id-token-lifetime-expiration-doesnt-end-user-session/64938/2 "2021-06-23T16:40:50Z")

</div>

Hi @dkotsuka,

The id\_token is primarily a cache of the user’s profile to provide better performance, so you don’t need to keep calling the `/userinfo` endpoint. It is not related to the user’s session, as a user with a valid Auth0 session can request new tokens as and when required.

Unfortunately, there isn’t currently a way to control a user’s session lifetime at an application-level “out of the box”, but you could have your applications call the Auth0 logout endpoint, for example, when your local session timed out, if you wanted their sessions to end quicker than the tenant level setting.

- [Log Users Out of Auth0](https://auth0.com/docs/logout/log-users-out-of-auth0)
- [Authentication API Explorer](https://auth0.com/docs/api/authentication#logout)

---

<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 25, 2021, 10:42am UTC](https://community.auth0.com/t/id-token-lifetime-expiration-doesnt-end-user-session/64938/3 "2021-06-25T10:42:08Z")

</div>

Thanks for helping with this one Steve!

---

<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:** [July 10, 2021, 10:43am UTC](https://community.auth0.com/t/id-token-lifetime-expiration-doesnt-end-user-session/64938/4 "2021-07-10T10:43:01Z")

</div>

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