Skip to content

Support for SameSite cookie option in browsers #268

Closed

Description

@eldadfux

Chrome will require support for this feature pretty soon (expected around Feb 20) while Safari has a bug in this feature implementation for versions lower than macOS 10.15 and iOS 13. We would probably have to set a browser sniffing function to handle this.

The related issue in webkit is:
https://bugs.webkit.org/show_bug.cgi?id=198181#c14

Activity

  1. self-assigned this
    on Dec 12, 2019
  2. added
    enhancement
    on Dec 12, 2019
  3. eldadfux commented on Jan 14, 2020

    @eldadfux
    MemberAuthor

    Just finished to implement this and it should be released on the upcoming version 0.5.

    This feature allow us to drop the success and failure redirect URLs. The login endpoint will result in a valid JSON response with no need for any HTTP redirects.

    There is also a fallback cookie used for clients that still miss support for the SameSite option or for non-https connections. The fallback cookie is postfixed with '_legacy' in its name

  4. eldadfux commented on Jan 17, 2020

    @eldadfux
    MemberAuthor

    Safari now completely blocks any 3rd party cookies leaving Appwrite with no secure way to set a user session on remote domains.

    This leaves us with two options:

    1. Setting a fallback session key in the user's localStorage. This is not considered a good practice. Any 3rd party or malicious script could easily get access and reuse the user session.
    2. Recommend or even enforce self-hosted setups to run on the same domain as the app domain (ex: appwrite.my-app.com). Another option is to allow users to set custom domains per project. The last option will require us to auto-generate self-signed certificates for custom domains.
  5. eldadfux commented on Feb 22, 2020

    @eldadfux
    MemberAuthor
  6. eldadfux commented on May 21, 2020

    @eldadfux
    MemberAuthor

    This feature was released in 0.5.

  7. added a commit that references this issue on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions