Closed typio closed 2 years ago
In production: getSession() works fine if new Redis() fails to create connection
Issue is actually caused by environment variables not being available in db.js when it is used by hooks.js, I think because getSession() is somewhat exposed to client and so the db.js gets blocked in some way.
Issue is actually caused by environment variables not being available in db.js when it is used by hooks.js, I think because getSession() is somewhat exposed to client and so the db.js gets blocked in some way.
Probably wrong, getSession() still doesn't seem to be setting the session for client when all it does is set the sessionId from cookie.
omfg its because the index.svelte had prerender=true from the default template, same thing as the other issue so stupid
It seems that SvelteKit trashes getSession() because of an issue with the redis var from db.ts