Skip to content

Accepting login challenge with remember: true, remember_for: 0 creates cookie with 30-day expiration #4126

Description

@Conduitry

Preflight checklist

Ory Network Project

No response

Describe the bug

When accepting a login request and specifying remember: true, remember_for: 0, in 2.3.0 this used to create a session ory_hydra_session_dev cookie with no explicit expiration date.

In 25.4.0 and 26.2.0, this instead produces a cookie that expires in 30 days. This prevents me from being able to refresh my own app's session from the user's Hydra session but only until the user closes their browser and discards their Hydra session cookie.

Reproducing the bug

Set up a sample project with default configuration that accepts a login request using remember: true and remember_for: 0. Observe that the response from /oauth2/auth for the Set-Cookie or ory_hydra_session_dev includes Max-Age=2592000 (30 days).

Relevant log output

Relevant configuration

Version

26.2.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions