# Is it possible to have a refresh token that never expires?

**URL:** <https://community.directus.com/t/is-it-possible-to-have-a-refresh-token-that-never-expires/887>\
**Category:** Help\
**Tags:** authentication\
**Created:** [July 31, 2025, 8:45pm UTC](https://community.directus.com/t/is-it-possible-to-have-a-refresh-token-that-never-expires/887 "2025-07-31T20:45:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Attacler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/attacler/32/99_2.png) [@Attacler](https://community.directus.com/u/Attacler)\
**Post date:** [July 31, 2025, 8:45pm UTC](https://community.directus.com/t/is-it-possible-to-have-a-refresh-token-that-never-expires/887/1 "2025-07-31T20:45:05Z")

</div>

Hey there,

Im working on a Desktop app and im wondering if there is any way of making sure that a refresh token never gets expired.  
In a normal webapp the default TTL would be acceptable but in this case its desktop app and i want users to sign in once and forget about it.  
So i dont want all sessions to last this long, just the ones from the desktop app.  
Is that possible or would i need to do some magic to make this work? (custom endpoint in Directus for example)

---

<div class="post-metadata">

**Author:** ![Nik](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@Nik](https://community.directus.com/u/Nik)\
**Post date:** [August 1, 2025, 9:27am UTC](https://community.directus.com/t/is-it-possible-to-have-a-refresh-token-that-never-expires/887/2 "2025-08-01T09:27:39Z")

</div>

I think you can artificially increase the refresh\_token `token` expiration date `expires` inside `directus_sessions` table after each login/refresh.

Directus stores a separate refresh\_token per user agent, so you basically should be able to distinguish your desktop app from other sources of authentication.
