diff --git a/src/app/api/auth/login/route.ts b/src/app/api/auth/login/route.ts index 5e600a0..c8ad6ce 100644 --- a/src/app/api/auth/login/route.ts +++ b/src/app/api/auth/login/route.ts @@ -34,9 +34,10 @@ export async function POST(request: NextRequest) { const response = NextResponse.json({ success: true }); response.cookies.set("auth-token", token, { httpOnly: true, - secure: process.env.NODE_ENV === "production", + secure: false, // Allow HTTP for local/internal deployments sameSite: "lax", maxAge: 60 * 60 * 24 * 7, // 7 days + path: "/", }); console.log("[LOGIN] Cookie set, returning success");