📌 Description
src/features/auth/pages/AuthCallbackPage.tsx handles the redirect back from GitHub OAuth. If the backend callback (internal/handlers/github_oauth.go) returns an error (denied consent, expired state, backend failure), this page needs a clear error UI rather than an infinite spinner or a blank screen, which is what typically happens when only the happy path is implemented.
🧩 Requirements and context
- Add explicit handling for an error query param / failed API response on mount.
- Show a clear, actionable error message with a way to retry sign-in, distinct from the loading state.
- Add a test for the error-param and network-failure paths, not just the success path.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b fix/auth-callback-error-state
2. Implement changes
- Modify:
src/features/auth/pages/AuthCallbackPage.tsx — add error branch with a retry CTA.
- Add test: new test file covering error and network-failure scenarios.
3. Test and commit
npm test -- run AuthCallbackPage
- Cover edge cases: GitHub returns an error param (user denied consent), backend session exchange fails with a 500, network failure during the callback request, user double-navigates back to this page after already completing auth.
- Include test output and details in the PR description.
Example commit message
fix: add error-state UI for failed OAuth callback
✅ Acceptance criteria
🔒 Security notes
An error state that silently hangs could mask a real backend issue (e.g. state-mismatch CSRF rejection) from the user — surfacing it clearly also makes it easier to notice abuse attempts during support triage.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
src/features/auth/pages/AuthCallbackPage.tsxhandles the redirect back from GitHub OAuth. If the backend callback (internal/handlers/github_oauth.go) returns an error (denied consent, expired state, backend failure), this page needs a clear error UI rather than an infinite spinner or a blank screen, which is what typically happens when only the happy path is implemented.🧩 Requirements and context
Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
src/features/auth/pages/AuthCallbackPage.tsx— add error branch with a retry CTA.3. Test and commit
npm test -- run AuthCallbackPageExample commit message
✅ Acceptance criteria
🔒 Security notes
An error state that silently hangs could mask a real backend issue (e.g. state-mismatch CSRF rejection) from the user — surfacing it clearly also makes it easier to notice abuse attempts during support triage.
📋 Guidelines