web dev//frontend//cookie
A cookie is a small file that the browser stores for each website and sends automatically with every HTTP request, which makes it the browser's native memory. The site's code does not control it; the browser (Chrome, Firefox or Safari) does.
A cookie is a small file that the browser stores for each website and sends automatically with every HTTP request, which makes it the browser's native memory. The site's code does not control it; the browser (Chrome, Firefox or Safari) does.
Every time the frontend makes a request to the backend, cookies travel in the headers. Nobody attaches them by hand: the browser injects them on its own.
In a Supabase app, the cookie holds the session token, the one that identifies the user as Carmen. It does not hold the Gmail token, which lives on the server in the profiles table. Cookies only transport identity, never the secrets of external services.
In Next.js, Supabase's SSR helpers (@supabase/ssr) read, write and refresh the tokens in cookies automatically. They are the SDK's framework-specific glue.
process.env has nothing to do with cookies: environment variables live on the server and cookies live in the browser, two separate channels.