Skip to content

New refresh logic

Bence Kovács requested to merge BugFix/observation_list_sync into develop

I have changed the refresh logic from timed refreshes. Now before every call, a i check the expiration time of the access token, and if has expired, before the original call i ask a new refresh token. Refresh token call is secured with a trial network call, if it fails with timeout, or takes a lot of time i wont refresh it and return with a network error. Bad connection notification is added to the syncing screen, and if somehow our refresh token invalidates, a button will navigate the user to the serverList page where he can easily log in. In that way i check the token before the call, but if somehow the server responds with invalid access token, i invalidate the token and retry the call, thus a new token will be asked.

HasTokenListener redux state has to be deleted if this is the right way to continue.

Server reducer got an initial hidden state.

Edited by Bence Kovács

Merge request reports