Skip to content

Cookie blocked in Chrome when embed in an iframe #1401

Closed

Description

@easychen

Some users of my website report that login not work when using the code-server embed in an iframe .

This seems to be related to the samesite setting adjusted in the latest version of chrome.

Is it possible to add an optional samesite option to setCookie to support the use of embedded in iframes?

This adjustment only needs to add extra parameters when setcookie, like:

setcookie ('cross-site-cookie', 'name', ['samesite' => 'None', 'secure' => true]);

Thanks.

Activity

  1. kylecarbs commented on Mar 9, 2020

    @kylecarbs
    Member

    I think we could do this. cc: @code-asher

  2. self-assigned this
    on Apr 17, 2020
  3. added this to the v3.5.1 milestone on Aug 30, 2020
  4. code-asher commented on Sep 30, 2020

    @code-asher
    Member

    We talked about changing this and decided to leave it at lax to have a better default defense against CSRFs. For anyone with this issue I think we'd recommend making sure all parent and iframe have the same origin.

    If the origin isn't the problem let me know the specific setup so we can investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementSome improvement that isn't a feature

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions