I had put the application in background and lets say token also expires at the same time and triggers a refresh call, I get "Network request failed" error in the catch block of auth0.auth.refreshToken but on auth0 dashboard it's logged as successful exchange.
When I launch the app again and since app didn't get the new token, it attempts to refresh the token again and this time I get "reuse of token detected" error.
This is difficult to reproduce locally but I was able to get this information from sentry and auth0 dashboard.
I've attached the screenshot from sentry and auth0 dashboard, logs can be verified from the same timestamps
Important thing to note here is: this happens only when app is in background. In foreground, everything works as expected.
I would really appreciate some help here.
Reproduction
I've no way to reproduce this easily as it happens when app is in background and some background task is triggered when token is already expired.
Issue is faced by number of users but there's no fixed pattern on reproducing it. From the sentry logs, I was able to identify above pattern.
Checklist
Description
I had put the application in background and lets say token also expires at the same time and triggers a refresh call, I get "Network request failed" error in the catch block of
auth0.auth.refreshToken
but on auth0 dashboard it's logged as successful exchange. When I launch the app again and since app didn't get the new token, it attempts to refresh the token again and this time I get "reuse of token detected" error.This is difficult to reproduce locally but I was able to get this information from sentry and auth0 dashboard. I've attached the screenshot from sentry and auth0 dashboard, logs can be verified from the same timestamps
Important thing to note here is: this happens only when app is in background. In foreground, everything works as expected.
I would really appreciate some help here.
Reproduction
I've no way to reproduce this easily as it happens when app is in background and some background task is triggered when token is already expired.
Issue is faced by number of users but there's no fixed pattern on reproducing it. From the sentry logs, I was able to identify above pattern.
Additional context
No response
react-native-auth0 version
3.2.1
React Native version
0.73.6
Expo version
No response
Platform
iOS
Platform version(s)
on all versions