Skip to content

Commit 388a279

Browse files
ComBbaclaude
andcommitted
fix: move NextAuth routes from /api/auth to /auth/api
DigitalOcean App Platform ingress strips the matched prefix when forwarding to components. The /api/auth rule stripped the prefix, causing NextAuth to receive /csrf instead of /api/auth/csrf. Fix: Move NextAuth route handler to /auth/api/[...nextauth] with basePath: "/auth/api". This path falls through the web catch-all without any prefix stripping, and is already covered by the /auth/ public path in middleware. Also removes the now-unnecessary /api/auth ingress rule. Google OAuth redirect URI must be updated to: https://vibedeploy-7tgzk.ondigitalocean.app/auth/api/callback/google Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dab9666 commit 388a279

7 files changed

Lines changed: 1868 additions & 7 deletions

File tree

.do/app.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ alerts:
77

88
ingress:
99
rules:
10-
# NextAuth OAuth routes → web (must be before /api catch-all)
11-
- component:
12-
name: web
13-
match:
14-
path:
15-
prefix: /api/auth
10+
# NextAuth routes now at /auth/api/* (handled by web catch-all)
1611
# API endpoints → backend
1712
- component:
1813
name: api

claudedocs/analysis-report.html

Lines changed: 875 additions & 0 deletions
Large diffs are not rendered by default.

claudedocs/production-hardening-report.html

Lines changed: 440 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)