This change also fixes a bunch of race conditions in the existing periodic refresh and device auth tests. It also improves the scheduled work by having it always run when the plugin starts or is reconfigured, so we're less likely to miss renewing access tokens.
This change also fixes a bunch of race conditions in the existing periodic refresh and device auth tests. It also improves the scheduled work by having it always run when the plugin starts or is reconfigured, so we're less likely to miss renewing access tokens.