Skip to content

fix(auth): poll at the server interval again once the GitHub token endpoint recovers - #35

Merged
MotherSphere merged 3 commits into
mainfrom
fix/device-flow-poll-interval
Oct 14, 2026
Merged

MotherSphere merged 3 commits into
mainfrom
fix/device-flow-poll-interval

Conversation

@MotherSphere

Copy link
Copy Markdown
Member

Follow-up to #33.

  • After a 429, a 5xx or a network error, the device flow doubled its poll interval (up to 60 s) and kept that value for the rest of the 15-minute code lifetime, so the user could wait up to a minute after approving on GitHub. The error backoff is now separate from the interval the server asked for (raised by slow_down), and an authorization_pending answer resets the wait to the server interval.
  • The doc comment on the built-in OAuth client IDs said a client ID entered in the UI takes precedence. fix(auth): sign in to GitHub with the device flow #33 reversed that order; the comment now matches the code.

Tests: cargo test device (7 device flow tests pass).

…dpoint recovers

A rate limit, a server error or a network error doubled the device flow poll interval, and the larger value stuck for the rest of the code lifetime. The error backoff is now kept apart from the server interval, so a pending answer goes back to the interval the server asked for.

Also corrects the doc comment on the built-in OAuth client IDs: they are used instead of a client ID entered in the UI.
@MotherSphere
MotherSphere merged commit efcbae2 into main Oct 14, 2026
6 checks passed
@MotherSphere
MotherSphere deleted the fix/device-flow-poll-interval branch October 14, 2026 11:57
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.

1 participant