-
Notifications
You must be signed in to change notification settings - Fork 1
Auth tightening #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Auth tightening #81
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The PTY handler was auto-responding to "Press Enter to retry" in OAuth error messages, causing the auth flow to silently retry instead of reporting the error to the user. Now error patterns are checked FIRST - if an error is detected, we return early and don't respond to any prompts in that chunk. This ensures errors are properly reported to the frontend. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Don't respond to prompts when session is in error state - Don't override error status with success or waiting_auth status - Prevent late URL extraction from changing error state This ensures that once an error is detected, the session stays in error state and doesn't accidentally trigger prompt responses or status changes from subsequent PTY output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Agents must always work on feature branches and let the user decide when to merge to main. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The onExit handler could override error status with 'success' if it found cached credentials after an OAuth error. Added check to skip credential extraction when already in error state. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Added race condition protection in submitAuthCode, pollForCredentials, and completeAuthSession to prevent overriding error state after async credential extraction operations. Uses type assertions to handle TypeScript narrowing with async race conditions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove unused BaseWrapperConfig import from base-wrapper.test.ts - Remove unused QueuedMessage import from pty-wrapper.ts - Remove unused SessionEndMarker and QueuedMessage imports from tmux-wrapper.ts - Remove unused escapeRegex function from tmux-wrapper.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Implements stale-while-revalidate caching pattern for user's GitHub repos: - First request: fetches first page (100 repos) synchronously, triggers background pagination to get remaining pages - Subsequent requests: serve from cache (10 min TTL), trigger background refresh after 5 min (stale-while-revalidate) - Background refresh paginates through all pages (up to 2000 repos) - Small delay between pages to avoid rate limiting This fixes the issue where users with >100 GitHub repos wouldn't see all workspaces they have contributor access to. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add initializingConnections Set to prevent duplicate API calls when multiple requests hit simultaneously with empty cache - Add evictOldestCacheEntries() to cap cache at 500 entries (LRU eviction) - Call eviction after all cache writes to prevent unbounded memory growth 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Critical fixes for OAuth auth reliability: 1. /creds endpoint now checks for token existence, not just status - Status='success' can be set before credentials are extracted - Added hasToken field to error response for debugging 2. Added error passthrough in /creds endpoint - Returns errorHint and recoverable for auth failures - Allows frontend to show actionable error messages 3. Added retry loop for credential fetching in cloud API - 5 retries with 1s delay (5s total wait) - Handles race between OAuth completion and credential extraction - Returns immediately on auth error (no retry) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
When a user is both owner AND member of a workspace (e.g., self-added), they would appear twice in the workspace list. Now we filter member workspaces to exclude any that the user already owns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fly.io machines can take 20-30 seconds to wake from suspension. The previous 15s timeout was causing 504 errors when accessing suspended workspaces. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Prevents race condition where error is detected after success pattern but setTimeout callback still attempts to extract credentials. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.