Skip to content

What is the reason behind converting the cookie.maxAge prop to an Expires value in the actual cookie? #176

@bttger

Description

@bttger

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

getCookieOpts() always converts the maxAge property to the expires property by creating a new Date and adding the maxAge to the current server's time. The returned object omits the maxAge property then. I believe this creates issues if the client's time is out of sync and goes against the expected behavior.

What is the rationale behind this design choice? To be honest, I hope the answer is not just "because express does it the same way" 😅

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