AshiBoyMan
AshiBoyMan
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
my next is 14
13 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
Yeah, I don't know either; maybe someone else does. Thanks for taking the time to answer! 😊
13 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
No, I don't, but here's the thing—I’m already authenticated and have the token stored in the browser. However, I can't access it because it's HTTP-only. I'm trying this in my server component:
import { cookies } from "next/headers";

const cookieStore = cookies();
console.log(cookieStore.getAll());
import { cookies } from "next/headers";

const cookieStore = cookies();
console.log(cookieStore.getAll());
but it doesn’t include the cookie I need. If I make a request to an API that doesn’t require a cookie, it works fine. But for the protected endpoint, the request fails.
13 replies