Skip to content

chore: delete dead auth/github stub routes#27

Open
sweetmantech wants to merge 1 commit into
mainfrom
chore/delete-dead-auth-routes
Open

chore: delete dead auth/github stub routes#27
sweetmantech wants to merge 1 commit into
mainfrom
chore/delete-dead-auth-routes

Conversation

@sweetmantech
Copy link
Copy Markdown
Contributor

@sweetmantech sweetmantech commented May 5, 2026

Summary

  • Delete the three app/api/auth/github/* and app/api/auth/signin/github route handlers
  • All three are leftovers from the Better Auth + linked-accounts flow that PR feat(db-unification): point open-agents at recoupable Supabase #26 ripped out — they only redirect, and their redirect targets no longer exist:
    • auth/github/callback/
    • auth/signin/github/api/auth/signin/vercel (404)
    • auth/github/reconnect/api/github/app/install (404)
  • Nothing in the app links to them; the OAuth flow they used to serve is replaced by Privy. The reconnect test asserted a redirect into a non-existent install route, so it goes too.

This is Phase A of the open-agents /api/api codebase migration (overall direction: api owns all backend, open-agents UI calls api over Privy Bearer; later folded into chat).

Test plan

  • bun run --cwd apps/web typecheck passes (no callers)
  • bun run check passes (no lint/format issues)
  • Grepped repo for auth/github, auth/signin/github, github_reconnect, /api/github/app/install — zero hits outside the deleted files
  • Vercel preview boots and /sessions still loads for an authenticated user

🤖 Generated with Claude Code


Summary by cubic

Removed dead GitHub auth routes apps/web/app/api/auth/github/{callback,reconnect} and apps/web/app/api/auth/signin/github, plus the reconnect test. They only redirected to missing endpoints and are obsolete after the Privy auth flow; this is Phase A of moving open-agents /api/ into the api codebase.

Written for commit 7bb1053. Summary will update on new commits.

Summary by CodeRabbit

  • Revert

    • Removed GitHub authentication callback endpoint.
    • Removed GitHub sign-in routing functionality.
    • Removed GitHub account reconnection feature.
  • Tests

    • Removed test coverage for GitHub reconnection flow.

These three routes were leftovers from the Better Auth + linked-accounts
flow ripped out in PR #26 (db unification). All three only redirect, and
their redirect targets do not exist:

- auth/github/callback        -> redirects to "/" (no real callback work)
- auth/signin/github          -> /api/auth/signin/vercel (404 — route gone)
- auth/github/reconnect       -> /api/github/app/install (404 — never built)

Nothing in the app links to them, the GitHub OAuth flow they served has
been replaced by Privy, and the reconnect test was asserting a redirect
into a non-existent install route — so the test goes too.

First step of porting open-agents' /api folder into the api codebase
(Phase A of the open-agents-into-chat consolidation).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-agents Ready Ready Preview May 5, 2026 11:18pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7839c27-9dd5-414f-afd0-678dae00af4f

📥 Commits

Reviewing files that changed from the base of the PR and between f6b05d8 and 7bb1053.

📒 Files selected for processing (4)
  • apps/web/app/api/auth/github/callback/route.ts
  • apps/web/app/api/auth/github/reconnect/route.test.ts
  • apps/web/app/api/auth/github/reconnect/route.ts
  • apps/web/app/api/auth/signin/github/route.ts
💤 Files with no reviewable changes (4)
  • apps/web/app/api/auth/signin/github/route.ts
  • apps/web/app/api/auth/github/reconnect/route.test.ts
  • apps/web/app/api/auth/github/reconnect/route.ts
  • apps/web/app/api/auth/github/callback/route.ts

📝 Walkthrough

Walkthrough

Deleted four GitHub authentication API routes and their test file: callback handler, reconnect flow with redirect sanitization, and signin redirect route. No replacement implementations provided.

Changes

GitHub Authentication Route Removal

Layer / File(s) Summary
API Routes
apps/web/app/api/auth/github/callback/route.ts, apps/web/app/api/auth/github/reconnect/route.ts, apps/web/app/api/auth/signin/github/route.ts
Three GitHub auth routes deleted: callback redirect handler, reconnect installer flow with sanitizeRedirectTo helper, and signin parameter forwarding to Vercel auth.
Tests
apps/web/app/api/auth/github/reconnect/route.test.ts
Test suite for the reconnect route removed, which verified cookie setting and 307 redirect to /api/github/app/install.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 Four routes hop away, auth flows rearrange,
GitHub callbacks fade to silence and change,
Reconnect and signin dance off the stage,
The auth saga turns a cleaner, simpler page! 🔐✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: deletion of dead auth/github stub routes that were no longer in use after the Better Auth flow was removed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/delete-dead-auth-routes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

You're on the cubic free plan with 19 free PR reviews remaining this month. Upgrade for unlimited reviews.

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