Sveltekit Node Session Repro
Repro
- Install all the dependencies (I use
pnpm
)
- Run the server in dev or preview mode and navigate to
http://localhost:3000/protected
- You should get redirected to
/auth/login
and have the option to log in (take a look at the client & serverside logs)
- Stop your dev server
- Build the site with
pnpm build
- Run the server through the adapter via
node _build
- If you are logged in, you'll get thrown to the login page event though you have a
token
cookie set
- In any case, you won't be able to log in anymore