# Do refresh tokens expire? Why is there an 'exp' attribute?

**URL:** <https://community.auth0.com/t/do-refresh-tokens-expire-why-is-there-an-exp-attribute/23530>\
**Category:** Get Help\
**Tags:** jwt, access-token\
**Created:** [April 4, 2019, 8:16am UTC](https://community.auth0.com/t/do-refresh-tokens-expire-why-is-there-an-exp-attribute/23530 "2019-04-04T08:16:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marius](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marius/32/12206_2.png) [@Marius](https://community.auth0.com/u/Marius)\
**Post date:** [April 4, 2019, 8:16am UTC](https://community.auth0.com/t/do-refresh-tokens-expire-why-is-there-an-exp-attribute/23530/1 "2019-04-04T08:16:51Z")

</div>

Hi there,

according to [Refresh Tokens - Auth0 Docs](https://auth0.com/docs/tokens/refresh-token/current) refresh tokens never expire.

> Since Refresh Tokens never expire, it is essential to be able to revoke them in case they get compromised.

Nevertheless when i decode the refresh token I’m getting from auth0, i see an ‘exp’ attribute. The lifetime is just a few thousand seconds. So whats the ‘exp’ for, if refresh tokens never expire in the first place?

Thanks!

---

<div class="post-metadata">

**Author:** ![zulfiqar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zulfiqar/32/3368_2.png) [@zulfiqar](https://community.auth0.com/u/zulfiqar)\
**Post date:** [April 4, 2019, 3:03pm UTC](https://community.auth0.com/t/do-refresh-tokens-expire-why-is-there-an-exp-attribute/23530/2 "2019-04-04T15:03:06Z")

</div>

Auth0 currently only supports opaque refresh\_tokens which never expire. You must be looking into access\_token which is JWT based and are usually short lived (by default 24 hours).

---

<div class="post-metadata">

**Author:** ![Marius](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marius/32/12206_2.png) [@Marius](https://community.auth0.com/u/Marius)\
**Post date:** [April 5, 2019, 6:04am UTC](https://community.auth0.com/t/do-refresh-tokens-expire-why-is-there-an-exp-attribute/23530/3 "2019-04-05T06:04:32Z")

</div>

Ahh, I see. I just put the refresh token in [https://www.jsonwebtoken.io/](https://www.jsonwebtoken.io/) and the output got the ‘exp’ attribute. But it seems like you can put anything in there an get this kind of output. So my fault / strange behavior of this site.

Mystery solved, case closed, thank you 🙂

---

<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:** [April 20, 2019, 6:04am UTC](https://community.auth0.com/t/do-refresh-tokens-expire-why-is-there-an-exp-attribute/23530/4 "2019-04-20T06:04:34Z")

</div>

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