#React Native refersh tokens error: INVALID_CREDENTIALS

2 messages · Page 1 of 1 (latest)

glass fable
#

Hi community!
I'm using react native as a front-end and working with refresh tokens. The tokens are checked on each request via an axios interceptor. Everything works fine while using the app. Tokens are refreshing, and when the access_token expires, a new one is requested with the refresh_token.

HOWEVER, when I leave my app closed for a while and open it again, the app tries to request a refresh_token, but it always gets a 401 error with INVALID_CREDENTIALS. The refersh_token is set for 30 days, so I don't understand why the post request throws this error...

The code: https://goonlinetools.com/snapshot/code/#5nbjk2xjlk3jzodyzc7oyr

dense barnBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)