Skip to content

Comments

Refresh Access Token Automatically When Keeping App Open For Long Durations#1354

Merged
mikedickey merged 1 commit intodevfrom
feature/refresh-access-token
Dec 8, 2024
Merged

Refresh Access Token Automatically When Keeping App Open For Long Durations#1354
mikedickey merged 1 commit intodevfrom
feature/refresh-access-token

Conversation

@dhing1024
Copy link
Contributor

@dhing1024 dhing1024 commented Dec 8, 2024

Should handle the cases of people leaving their app open for long durations (>24h) more robustly. Currently, we don't continuously refresh our access token (which expires after 24h) after the initial app login, so things may break if you try to use the app after it expires.

This handles a few more cases by adding a

  • periodic access token refresh timer with an interval of 3 hours, and
  • an additional access token refresh event when the window is focused and the current token is at least an hour old

This should additionally handle the case where the device goes to sleep for >24hours and wakes up again (though the user would need to click on the window to focus it and refresh the token). Having that done automatically might be useful but can be done in a separate PR if we need it.

@dhing1024 dhing1024 changed the base branch from main to dev December 8, 2024 20:11
@dhing1024 dhing1024 marked this pull request as ready for review December 8, 2024 20:32
@mikedickey mikedickey merged commit 431fee0 into dev Dec 8, 2024
@dhing1024 dhing1024 mentioned this pull request Dec 10, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants