Description
Describe the bug
If user launches the app in offline mode and access token is expired, user is logged out (even if refresh token is still valid). It obvious that access token cannot be refreshed as phone is offline, but could there be some other way to handle. As refresh token is still valid, access token could be refreshed when phone appears again online.
This is problematic when access token validity period is short.
Steps To Reproduce
- Log into the app
- Set phone offline and close (kill) the app
- Wait until access token validity time expires (e.g. 1h)
- Launch app again
Actual behaviour:
User sees login screen. User can continue using the app after wifi/data enabled and user has logged again into the app.
Expected behaviour:
User lands to the app as logged in. No network request can be done as access token not valid and phone in offline. As refresh token is still valid, after user enables wifi/data (phone online again), access token is refreshed and user can continue using the app normally (no need to login).