Refresh Tokens don’t have an expiry attached to them.
You already said you are storing the new refresh token.
So you have something else going on that is causing the token and it’s refresh token to be dead.
As you should be able to keep refreshing forever!
Either the user did something like
- disconnect the app,
- reset their password,
- generated 25 tokens, and the 26th token killed the first in the list. (Generating could be logging into your application for example, and not revoking as you go)
(Generating 25 tokens doesn’t mean refreshing, it’s 25 token/refresh token pairs)