Skip to content

The new cookies API doesn't actually set cookies in Safari? #6632

@kevinrenskers

Description

@kevinrenskers

Describe the bug

I've migrated to SvelteKit 1.0.0-next.475 and its new cookies API, and logging into my website no longer works, cookies are no longer set at all.

Reproduction

https://github.com/kevinrenskers/sk-cookie-bug

On the homepage I show the token which is stored in a cookie, which of course defaults to undefined. There is a link to a login page, which has a login button. This does a request to a local endpoint, which sets a cookie. It then redirects you back to the homepage, and that token should now be updated.

In reality the token is still undefined, and looking at the cookies in the storage inspector, there is nothing there.

This used to work with the previous set-header method just fine.

Logs

No response

System Info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 574.67 MB / 32.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.17.0 - ~/Library/pnpm/node
    npm: 8.15.0 - ~/Library/pnpm/npm
  Browsers:
    Safari: 15.6.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.71
    @sveltejs/kit: next => 1.0.0-next.475
    svelte: ^3.44.0 => 3.50.0
    vite: ^3.1.0 => 3.1.0

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions