hi anyone have every worked on setting up cookies in next server components
Unanswered
Bombay posted this in #help-forum
BombayOP
Let's understand the whole scenario I'm facing, I'm getting access token from my api and I want to set it as cookiee in server component, yeah it worked with setting it through middleware but the thing is when i call api it gives me new token on every new request and middleware is called multiple times so new token is set every time, api request are increasing, and also help me to understand how should I cache token on server component in next Js
2 Replies
Not possible to set cookies in RSCs because this is not compatible with streaming them