getting undefined while getting cookies
Unanswered
Otterhound posted this in #help-forum
OtterhoundOP
const cookieStore = cookies();
const next = cookieStore.get("nextjs");
console.log(next); cookies().set("nextjs",res._id); what am i doing wrong and when i go to post route it is giving me the value but in get route is says undefined3 Replies
Where are you calling cookies.set?
OtterhoundOP
in login route
@Clown Where are you calling cookies.set?
OtterhoundOP
and calling cookies.get in get route of task