Redesign marketing pages and isolate public routes from app auth.

Give the landing, legal, and sign-in flows a consistent product shell while keeping marketing pages free of tRPC/session calls, fixing dev auth URL handling, and refreshing env and deploy docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 02:00:06 -04:00
co-authored by Cursor
parent 82977b6dd8
commit 6ec26a4a0d
36 changed files with 1743 additions and 819 deletions
+27
View File
@@ -0,0 +1,27 @@
import { headers as nextHeaders } from "next/headers";
import { auth } from "~/lib/auth";
export function hasSessionCookie(headers: Headers): boolean {
const cookie = headers.get("cookie") ?? "";
return (
cookie.includes("better-auth.session_token=") ||
cookie.includes("__Secure-better-auth.session_token=")
);
}
export async function getOptionalServerSession(headers: Headers) {
if (!hasSessionCookie(headers)) {
return null;
}
try {
return await auth.api.getSession({ headers });
} catch (error) {
console.error("[auth] Failed to resolve session:", error);
return null;
}
}
export async function getOptionalServerSessionFromHeaders() {
return getOptionalServerSession(await nextHeaders());
}