Skip to content

Conversation

@eswan18
Copy link
Owner

@eswan18 eswan18 commented Feb 8, 2026

Summary

  • Follow-up to Fix OAuth redirect URI behind reverse proxy #115 — the redirect_uri was fixed but all NextResponse.redirect calls still used request.url as the base URL, which resolves to 0.0.0.0:3000 inside the pod
  • Define baseUrl = process.env.APP_BASE_URL ?? request.nextUrl.origin at the top of each route handler and use it everywhere
  • Falls back to request origin for local development when APP_BASE_URL isn't set

Test plan

  • Deploy to staging, verify full OAuth login flow completes and redirects to forecasting-staging.tailc06f30.ts.net
  • Verify error redirects also go to the correct host
  • Verify local dev still works without APP_BASE_URL set

🤖 Generated with Claude Code

…_uri

All NextResponse.redirect calls used request.url as the base, which
resolves to the pod's internal 0.0.0.0:3000 behind a reverse proxy.
Use APP_BASE_URL consistently with a fallback to request.nextUrl.origin
for local development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eswan18 eswan18 merged commit b597b7c into main Feb 8, 2026
1 check failed
@eswan18 eswan18 deleted the fix/oauth-redirect-base-url branch February 8, 2026 20:46
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