import { createFileRoute } from "@tanstack/react-router";
import { LegalPage, LegalSection } from "~/components/legal/LegalPage";
import { getLegalInfo } from "~/fns/legal";
import { TextLink } from "~/ui/TextLink";
import { seo } from "~/utils/seo";
export const Route = createFileRoute("/cookies")({
loader: () => getLegalInfo(),
head: ({ match }) => ({
meta: seo({
origin: match.context.publicUrl,
path: "/cookies",
title: "Cookie Policy · gitfor",
description: "The only cookies gitfor sets, and why there is no banner.",
}),
}),
component: CookiesPage,
});
/** Every cookie the worker sets; keep in sync with src/server/auth.ts, two-factor.ts, github-oauth.ts, sites/access.ts. */
const COOKIES = [
{
name: "__Host-gitfor_session",
purpose: "Keeps you signed in. HttpOnly, Secure, SameSite=Lax.",
lifetime: "30 days (ends after 14 days without use, or when you sign out)",
},
{
name: "__Host-gitfor_2fa",
purpose: "Remembers that you passed the password step while you enter a two-factor code.",
lifetime: "5 minutes",
},
{
name: "__Host-gitfor_oauth",
purpose: "Protects GitHub sign-in against cross-site request forgery.",
lifetime: "10 minutes",
},
{
name: "__Host-gitfor_integration_oauth",
purpose: "Protects connecting an integration against cross-site request forgery.",
lifetime: "10 minutes",