-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The cloud.refresh() API helper seems to work great in keeping up a functional token. What really needs to be done though is to create some logic into cloud.authenticate() to "every now and then" refresh() as well.
Since we don't actually know the expiry logic of the tokens it's a bit of a guesswork though what criteria to use for refresh automation. i.e. does a token expire if it isn't used for X amount of time? Or does a token expire even if it's actively used after X amount of time?
A naive implementation could simply refresh the token once a day which is totally overkill but better than refreshing say once a week and finding it expired and having to trigger the OTP flow.
Summa summarum, needs thinking about, feedback welcome.