Skip to content

Fix: Better handling of access tokens and secrets

This changes tries to improve the handling of tokens needed for the Dropbox sync. Currently, we see issues that the tokens eventually expire and the app does not automatically update them.

This change introduces two changes to "fix" this:

The first is to only run a connectivity check if we actually have credentials loaded for an account. Otherwise, this could cause issues if we try a refresh for an account.

Todo: Here, it would be good to have a timeout on top - just to prevent endless waiting for the token refresh in case we have bad data.

And second, we now check if the tokens expire soon before starting a sync. In this case, we run a connectivity check first, which should renew the token which in turn would cause a sync to be run later.

Closes #542 (closed)

Merge request reports