how can modify cookies in route handler with server action
let say we have page route
server signout is implemented as given below
can anyone tell me why it is giving error in production as
ReadonlyRequestCookiesError: 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-options
please help
Functions: cookies
API Reference for the cookies function.
0 Replies