Skip to content

Move the session and TTL helpers out of public.ts - #784

Draft
dowski wants to merge 1 commit into
dowski/compute-refresh-token-expiryfrom
dowski/session-helpers
Draft

dowski wants to merge 1 commit into
dowski/compute-refresh-token-expiryfrom
dowski/session-helpers

Conversation

@dowski

@dowski dowski commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

The refresh-token lifecycle helpers (lookup, issuing, redeeming, pruning,
and deleting a session) move to component/sessions.ts, along with the
constants they use, and the TTL config and expiry helpers move to
component/expiry.ts. A newestIssuedToken helper is pulled out of
listSessions.

No behavior change. This prepares the helpers for a session cleanup loop
that needs them outside the public functions. refreshTokenExpiresAt now
takes the refresh-token TTL in seconds rather than the whole config, since
the loop will only have that value.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
auth-v2 Ready Ready Preview Oct 27, 2026 3:04pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
convex-auth-docs Ignored Ignored Oct 27, 2026 3:04pm UTC

Request Review

dowski commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@convex-dev/auth@784

commit: 5a2e1cd

The refresh-token lifecycle helpers (lookup, issuing, redeeming, pruning,
and deleting a session) move to component/sessions.ts, along with the
constants they use, and the TTL config and expiry helpers move to
component/expiry.ts. A newestIssuedToken helper is pulled out of
listSessions.

No behavior change. This prepares the helpers for a session cleanup loop
that needs them outside the public functions. refreshTokenExpiresAt now
takes the refresh-token TTL in seconds rather than the whole config, since
the loop will only have that value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview – auth-v2 — 5a2e1cd1 Deployed Oct 27, 2026 by vercel[bot]
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