Setting Cookies with Next Safe Action #234
Closed
laurent512
started this conversation in
General
Replies: 1 comment 2 replies
-
Not at all, on my end the cookie gets correctly set with your exact same code, both via direct execution and hooks. Can you please provide a link to a minimal reproduction of this issue? Thanks. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I tried to do set the cookies in an action and it does not work
I have the following error : Action 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-options
Example of code
Is it expected? How would you be able to set a cookie diferently?
Beta Was this translation helpful? Give feedback.
All reactions