Skip to content

fix: increase polling interval for GitHub device code flow#2899

Merged
setchy merged 1 commit into
gitify-app:mainfrom
ChaosZ-1702:fix-device-code-auth-polling-backoff
May 17, 2026
Merged

fix: increase polling interval for GitHub device code flow#2899
setchy merged 1 commit into
gitify-app:mainfrom
ChaosZ-1702:fix-device-code-auth-polling-backoff

Conversation

@ChaosZ-1702
Copy link
Copy Markdown
Contributor

Description

This PR fixes #2867 where the GitHub device auth flow gets stuck and gets rate-limited with excessive requests due to the app ignoring slow_down responses from the GitHub API.

According to RFC 8628, when a slow_down error is received, the polling interval must be increased by 5 seconds.

Changes

  • flows.ts: Differentiated the authorization_pending and slow_down in pollGitHubDeviceFlow. When slow_down, session.intervalSeconds is now incremented by 5.
  • LoginWithDeviceFlow.tsx: Moved intervalMs inside the polling loop to ensure that any adjustments made to session.intervalSeconds by the API response are immediately applied to the next cycle.
  • flows.test.ts: Updated the tests to explicitly verify that the interval remains unchanged on authorization_pending and correctly increases by 5 on slow_down.

@github-actions github-actions Bot added the bug Something isn't working label May 17, 2026
@setchy setchy merged commit abeb0d7 into gitify-app:main May 17, 2026
13 checks passed
@setchy setchy added this to the Release 7.0.0 milestone May 17, 2026
@ChaosZ-1702 ChaosZ-1702 deleted the fix-device-code-auth-polling-backoff branch May 17, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

fix: GitHub app device code auth polling backoff

2 participants