# Keeping a session alive

**URL:** <https://community.auth0.com/t/keeping-a-session-alive/130525>\
**Category:** Get Help\
**Tags:** authentication-sessions, sessions\
**Created:** [March 26, 2024, 3:29pm UTC](https://community.auth0.com/t/keeping-a-session-alive/130525 "2024-03-26T15:29:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.s](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@david.s](https://community.auth0.com/u/david.s)\
**Post date:** [March 26, 2024, 3:29pm UTC](https://community.auth0.com/t/keeping-a-session-alive/130525/1 "2024-03-26T15:29:53Z")

</div>

On web, Auth0 provides a session cookie that keeps the user’s session active as long as there is activity.

We would like to do the same thing on mobile.

**Current behavior:**  
Currently, both the id\_token and access\_token have fixed expirations times. Regardless of use, the id\_token and access\_token will expire based on how we’ve set them. There is no way to keep a session alive during activity without using a refresh token (which we do not want to use for that purpose).

**Desired behavior:**  
We would like to make a call to Auth0 with an existing id\_token and access\_token before the expiration and get a new id\_token and access\_token with the expiration updated. For example, if the tokens both have a 30 minute expiration, we’d like to make an api request with those two tokens after (for example) 10 minutes and get back a new id\_token and access\_token with a “re-upped” 30 minute expiration. We want to do this without using a refresh\_token.

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [April 30, 2025, 6:56pm UTC](https://community.auth0.com/t/keeping-a-session-alive/130525/2 "2025-04-30T18:56:41Z")

</div>

Hi @david.s,

Welcome back to the Auth0 Community and sorry for the late reply.

Unfortunately is not possible to configure the Access Token expiry time from request to request at the moment. The “ **Maximum Access Token Lifetime** ” can only be set at a standard value and cannot be dynamically changed. This comes in alliance with this [Knowledge Article](https://community.auth0.com/t/changing-access-token-expiry-dynamically/166719) as well, which suggests proposing a new [Product Feedback](https://community.auth0.com/c/feedback/95) so this behavior can be taken in consideration by our engineers team.

Best reagards,  
Remus

---

<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:** [May 14, 2025, 6:57pm UTC](https://community.auth0.com/t/keeping-a-session-alive/130525/3 "2025-05-14T18:57:21Z")

</div>

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