Next.js Discord

Discord Forum

Trying to update cookie from server-side page

Unanswered
Savannah posted this in #help-forum
Open in Discord
SavannahOP
Hello!
I'm in the process of implementing my own little auth system (please don't tell me it's stupid to do this myself) Now I've run into the problem that when I want to retrieve the session from the server side, it works, but not with the session cookie update.

Server (page.tsx) -> getSession function -> retrieve session from route handler or without route handler (I tried both = doesn't work) -> try to update session cookie (e.g. reset session expiration).

does anyone know of any workarounds?

thx!

1 Reply