mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user