# Refresh token lifetime and session length

**URL:** <https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [June 21, 2023, 9:54pm UTC](https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722 "2023-06-21T21:54:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukaszkorona](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lukaszkorona/32/15370_2.png) [@lukaszkorona](https://community.auth0.com/u/lukaszkorona)\
**Post date:** [June 21, 2023, 9:54pm UTC](https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722/1 "2023-06-21T21:54:54Z")

</div>

Hi,  
Do I understand correctly that with Refresh Token we can allow user to be authenticated for 30 days without the need to go through the login form?  
Since we have Refresh TOken absolute lifetime set to 1296000 which is 30 days and Inactivity lifetime to 1296000 (15 days) a user should be forced to login every 15 days if not using the app and every 30 days when using the app?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 23, 2023, 12:35pm UTC](https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722/3 "2023-06-23T12:35:48Z")

</div>

Hi @lukaszkorona,

The refresh token is used to obtain a _new access token_, but cannot be used to “refresh the session”.

The login session is determined by the [Session Lifetime Limits](https://auth0.com/docs/manage-users/sessions/session-lifetime-limits). These settings will determine when a user is prompted to login.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![lukaszkorona](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lukaszkorona/32/15370_2.png) [@lukaszkorona](https://community.auth0.com/u/lukaszkorona)\
**Post date:** [June 25, 2023, 8:04am UTC](https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722/4 "2023-06-25T08:04:19Z")

</div>

It does but why is it like that? Is it part of the specification or a security concern? I’m trying to understand it because from our perspective session limits are very low. Especially Inactivity timeout (max 3 days).

We have users logging in every few days and we see high dropout rate on the login form.

Does the limits also apply to native apps?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 26, 2023, 1:07pm UTC](https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722/5 "2023-06-26T13:07:13Z")

</div>

From what I can find, the OAuth2 spec makes no mention of refreshing a session with the refresh token, and limits the token’s scope to fetching a new access token.

I can also clarify my initial response: There are multiple [layers of sessions](https://auth0.com/docs/manage-users/sessions/session-layers) happening, and even the though the Auth0 Session has expired does not immediately result in the Application Session expiring.

For example: A refresh token can be used to retrieve access tokens for the configured time period, even when the Auth0 Session Layer has expired. This would essentially allow the (native) application to retrieve tokens and continue the Application Session even when the Auth0 Session has reached it’s limit. The Session Lifetime settings are separate from the Refresh Token Lifetimes. This FAQ illustrates it: [Inactivity Expiration with Refresh Token](https://community.auth0.com/t/inactivity-expiration-with-refresh-token/91171/1)

We also offer a _Long Lived Sessions_ feature with enterprise subscriptions. This feature allows you to configure your Auth0 session to inactivity timeouts of up to 100 days.

---

<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, 2023, 1:08pm UTC](https://community.auth0.com/t/refresh-token-lifetime-and-session-length/109722/6 "2023-07-10T13:08:02Z")

</div>

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