-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
jamesdlevine/pdd
#1Labels
bugSomething isn't workingSomething isn't working
Description
Description
When running pdd auth login in a remote SSH session, the authentication flow fails with a 429 Too Many Requests error from GitHub's OAuth endpoint.
Steps to Reproduce
- Connect to a remote machine via SSH
- Run
pdd auth login - Open
https://github.com/login/devicein a browser and enter the provided code - Wait for authentication to complete
Expected Behavior
The device code should be successfully exchanged for an OAuth access token after the user authorizes the application in their browser.
Actual Behavior
The authentication fails with:
Token error: Error exchanging device code for token: 429 Client Error: Too Many Requests for url:
https://github.com/login/oauth/access_token
Error during 'unknown' command:
An unexpected error occurred: Process exited with code 1
Environment
- pdd-cli version: 0.0.115 → 0.0.116 (upgraded during session)
- Python: 3.12 (miniconda)
- Platform: Linux (remote SSH session)
- Note: Keyring backend unavailable (warning shown)
Additional Context
- The session was detected as a remote SSH session (
SSH_CONNECTIONenvironment variable detected) - A keyring warning was also shown: "No recommended backend was available"
- The 429 error suggests the device code polling may be occurring too frequently, exceeding GitHub's rate limits for the OAuth device flow
Possible Causes
- The polling interval for the device code flow may be too aggressive (GitHub recommends at least 5 seconds between polls)
- Multiple concurrent authentication attempts may have exhausted the rate limit
- The retry logic may not be respecting the
intervalorslow_downresponses from GitHub
Suggested Fix
Review the device code polling implementation to ensure it:
- Respects the
intervalparameter returned by GitHub (default 5 seconds) - Handles
slow_downerror responses by increasing the polling interval - Implements exponential backoff on 429 errors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working