# Token could not be decoded or is missing in DB

**URL:** <https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070>\
**Category:** JWT.io\
**Tags:** refresh\_token, refresh-tokens\
**Created:** [November 21, 2024, 12:33pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070 "2024-11-21T12:33:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![freetechnologiesapp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/freetechnologiesapp/32/62407_2.png) [@freetechnologiesapp](https://community.auth0.com/u/freetechnologiesapp)\
**Post date:** [November 21, 2024, 12:33pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070/1 "2024-11-21T12:33:29Z")

</div>

Good morning everyone,

I am opening this topic because my users are experiencing login issues with my app due to the refresh token exchange.  
The logs indicate the error mentioned in the topic title, but I can’t fully understand when it occurs.

I was able to reproduce it locally a few times, but I can’t track a clear solution or prevention method.

In my application, Allow Refresh Token Rotation (2592000s) and Maximum Refresh Token lifetime (31557600s) are enabled.

I’ve now set both to 900s to see if the problem persists, but I’m uncertain whether this will resolve it.

Can anyone help?  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [November 21, 2024, 2:28pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070/4 "2024-11-21T14:28:42Z")

</div>

Hi @freetechnologiesapp

Welcome to the Auth0 Community!

Thank you for posting your question. The error `Token could not be decoded or is missing in DB` is related to the `Unsuccessful Refresh Token exchange, reused refresh token detected.` If your app is reusing a token, Auth0 detects this and invalidates the whole refresh token family, so you can no longer use that token. Any subsequent use of that same token will result in the `Token could not be decoded or is missing in DB` error message. I would guide you to check the logic behind refresh token usage as, based on the logs, that’s where the issue could be.

> **[Log Event Type Codes](https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes)**
>
> Lists the event codes associated with log events.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![freetechnologiesapp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/freetechnologiesapp/32/62407_2.png) [@freetechnologiesapp](https://community.auth0.com/u/freetechnologiesapp)\
**Post date:** [November 21, 2024, 9:18pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070/5 "2024-11-21T21:18:23Z")

</div>

Thank you for the response. It was very helpful in better understanding the token rotation mechanism, which I hadn’t realized was not directly linked to the Refresh Token Expiration. Additionally, I was also facing client-side management issues

---

<div class="post-metadata">

**Author:** ![joe.a](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joe.a/32/35942_2.png) [@joe.a](https://community.auth0.com/u/joe.a)\
**Post date:** [November 26, 2024, 8:28pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070/6 "2024-11-26T20:28:26Z")

</div>

We are seeing this behavior sometimes as well. Would using two different browsers and the same user account cause this issue?

---

<div class="post-metadata">

**Author:** ![jesse5](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jesse5/32/12681_2.png) [@jesse5](https://community.auth0.com/u/jesse5)\
**Post date:** [December 4, 2024, 3:39pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070/7 "2024-12-04T15:39:43Z")

</div>

We just started seeing a large number of these recently, but we haven’t made any configuration changes. Has there been a recent change in how these are handled, @dawid.matuszczyk?

---

<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:** [December 18, 2024, 3:39pm UTC](https://community.auth0.com/t/token-could-not-be-decoded-or-is-missing-in-db/152070/8 "2024-12-18T15:39:43Z")

</div>

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