Skip to content

fix(graphql-server): parse interval auth cookie durations#1339

Open
Zetazzz wants to merge 1 commit into
mainfrom
fix/auth-cookie-interval-durations
Open

fix(graphql-server): parse interval auth cookie durations#1339
Zetazzz wants to merge 1 commit into
mainfrom
fix/auth-cookie-interval-durations

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared PgInterval type for auth settings loaded from PostgreSQL interval columns.
  • Add interval conversion helpers for seconds and milliseconds.
  • Parse interval objects in session cookie duration handling while preserving existing numeric string behavior.

Why

app_settings_auth.cookie_max_age and remember_me_duration are PostgreSQL interval columns. The pg driver returns them as interval objects, but the cookie helper only parsed string seconds, causing configured session durations to fall back to the default.

Validation

  • pnpm --filter @constructive-io/graphql-server test -- cookie.test.ts pg-interval.test.ts
  • pnpm --filter @constructive-io/express-context build
  • pnpm --filter @constructive-io/graphql-server build
  • git diff --check

@Zetazzz Zetazzz marked this pull request as ready for review July 7, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant