nextjs cannot set cookies - Error: Cookies can only be modified in a Server Actions or Route Handler.

 As stated in this open issue here:

https://github.com/vercel/next.js/issues/51875

The solution is the user either server actions or route handler as documented here. 

https://nextjs.org/docs/app/api-reference/functions/cookies


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm