# Unknown or invalid refresh token before refreh token expires in mobile app

**URL:** <https://community.auth0.com/t/unknown-or-invalid-refresh-token-before-refreh-token-expires-in-mobile-app/129403>\
**Category:** Get Help\
**Tags:** identifier-first, login-experience\
**Created:** [March 11, 2024, 10:02am UTC](https://community.auth0.com/t/unknown-or-invalid-refresh-token-before-refreh-token-expires-in-mobile-app/129403 "2024-03-11T10:02:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ameetkumar\_mandala](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ameetkumar\_mandala](https://community.auth0.com/u/ameetkumar_mandala)\
**Post date:** [March 11, 2024, 10:02am UTC](https://community.auth0.com/t/unknown-or-invalid-refresh-token-before-refreh-token-expires-in-mobile-app/129403/1 "2024-03-11T10:02:51Z")

</div>

I get this error: “Unknown or invalid refresh token.” in two scenario’s.

1. when the refresh token is actually expired (as per set in dashboard)
2. When a old refresh token is used to generate a new access token. (refresh token rotation is enabled.)

In second case i don’t know how SDK is create a API request(to generate a new access token) with old refresh token, because SDK is dealing with refresh token.

Is there any way to detect the actual refresh token expiry?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 13, 2024, 11:25pm UTC](https://community.auth0.com/t/unknown-or-invalid-refresh-token-before-refreh-token-expires-in-mobile-app/129403/3 "2024-03-13T23:25:25Z")

</div>

Hey there @ameetkumar_mandala !

> [@ameetkumar\_mandala](#):
>
> Is there any way to detect the actual refresh token expiry?

As far as I’m aware there isn’t a way to check the expiry time of a refresh token - Basically if there is an error, it’s likely expired (due to absolute expiration being set w/ rotation) and the user is required to re-authenticate.

---

<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:** [March 27, 2024, 11:26pm UTC](https://community.auth0.com/t/unknown-or-invalid-refresh-token-before-refreh-token-expires-in-mobile-app/129403/4 "2024-03-27T23:26:10Z")

</div>

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