Closed ab-bee closed 1 hour ago
Hi @ab-bee, thanks for reporting this issue we will start investigation.
Also could you clarify:
see no tokens in local storage
by local storage, you mean the underlying AsyncStorage of your react-native app?
Hi @ab-bee I couldn't reproduce this error in a react-native app that's running on Android.
I also verified that when no network connection, the underlying refresh tokens service calls failed due to NetworkError
, but the expired tokens remain in the AsyncStorage along with the effective refresh token. And when the device regain network, refresh token worked correctly.
We recently fixed (v6.7.0) a bug that disturbed the above flows and causing the tokens to be cleared. If you upgraded aws-amplify from an older version, could you try to clean all build cache and try again?
Hi @ab-bee, thanks for reporting this issue we will start investigation.
Also could you clarify:
see no tokens in local storage
by local storage, you mean the underlying AsyncStorage of your react-native app?
Thank you! Yes, that's right.
Thank you for confirming @ab-bee. Were you able to verify the suggestion I gave above?
Thank you for confirming @ab-bee. Were you able to verify the suggestion I gave above?
Hi again, I have cleared out the node_modules
and build cache and can't reproduce this again. Will close the issue, thank you.
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
Users are signed out before their refresh token expires if they lose internet connection.
There are no tokens in local storage when they're signed out.
Using the latest AWS Amplify version (v6.9.0).
Expected behavior
Users remain signed in until their refresh token expires.
Reproduction steps
Log output
Manual configuration
Mobile Operating System
Android