pixelmund / svelte-kit-cookie-session

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

Session Cookie not being set in safari #46

Closed yoh-extradat closed 1 year ago

yoh-extradat commented 1 year ago

Setup everything according to docs and it works like a charm on chrome, firefox and edge. However the cookie will not be set on safari. Any ideas why or how to solve this issue?

pixelmund commented 1 year ago

@yoh-extradat

Hey, sorry for the late response!

Can you try setting the secure cookie option to false? I think safari blocks it when not on https

export const handle = handleSession({
    secret: 'SOME_COMPLEX_SECRET_AT_LEAST_32_CHARS',
        cookie: {
            secure: false
        }
});
pixelmund commented 1 year ago

The default for cookie.secure is now false while in dev