Hello dear developers, I have recently faced some issue with Next.js server/client cookies. Here is what I'm trying to do: 1 screenshot: function to signin/signup the user, it takes token from response and saving it to the cookies. 2 screenshot: 2 functions for getting and saving token to the cookies. 3 screenshot: api interceptors, i'm trying to get token from the cookies by getAccessTokenFromCookies() function and assign it to the Authorization header. 4 screenshot: Client component, function trigger for signin/signup If a function trigger is inside of a client component, so function main from auth service should be also client, and then function which saves token to the cookies also, am I wrong? On 3 screenshot I always get undefined becase, typeof window === undefined, therefore its not a client component, but why... Is there any way to get around it? Thanks for reading:)