Error: Cookies can only be modified in a server action WHILE IN A SERVER ACTION
Unanswered
Forest bachac posted this in #help-forum
Forest bachacOP
export async function clearSessionCookie() {
12 | "use server";
> 13 | cookies().set(authCookieName, "");
| ^
14 | }Error: Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options1 Reply
where are you calling the action from?
@Forest bachac
@Forest bachac