pixelmund / svelte-kit-cookie-session

⚒️ Encrypted "stateless" cookie sessions for SvelteKit
MIT License
184 stars 12 forks source link

Login issues with v2.0.5 #28

Closed andrasbacsai closed 2 years ago

andrasbacsai commented 2 years ago

I know it's not released yet officially - at least based on the GitHub releases, but the update has a weird error, causing failed login attempts.

Error: Not found: /api/v2/user/apps/appData/test1/logs
    at resolve (file:///app/server/app.js:1678:20)
    at async file:///app/server/app.js:1741:16
    at async Object.handle (file:///app/node_modules/svelte-kit-cookie-session/dist/esm/handle.js:7:26)
    at async respond (file:///app/server/app.js:1610:22)
    at async Array.ssr (file:///app/handler-81c538e0.js:783:19)
pixelmund commented 2 years ago

Are you sure this is related to svelte-kit-cookie-session?

The error seems to be caused by your passedHandle function: This line

Can you share a repo or a small reproduction i can look at because this information isn't really helpful, i've just updated the example which is working fine with v2.0.5.

andrasbacsai commented 2 years ago

Reverting to 2.0.2 fixed the issue.

Here is the codebase (tag v2.0.13) where I use your library: https://github.com/coollabsio/coolify/blob/v2.0.12/src/hooks.ts

pixelmund commented 2 years ago

It should be fixed in v2.1.0, i've also added the parsed cookies into locals now, so you don't have to parse it again!

andrasbacsai commented 2 years ago

Thank you!