Fix /setup unreachable for unauthenticated users

The proxy treated /setup as a protected route, redirecting unauthenticated
users to /login. This made first-run TMDB onboarding unreachable since
no users exist yet. Add /setup to public auth routes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 19:21:23 -05:00
co-authored by Claude Opus 4.6
parent b565fb1023
commit 9e674f44aa
+1 -1
View File
@@ -1,7 +1,7 @@
import { getSessionCookie } from "better-auth/cookies";
import { type NextRequest, NextResponse } from "next/server";
const authRoutes = new Set(["/login", "/register"]);
const authRoutes = new Set(["/login", "/register", "/setup"]);
export function proxy(request: NextRequest) {
const sessionCookie = getSessionCookie(request);