Skip to content

Compute refresh token expiry using the time it was issued and the current TTL - #781

Draft
dowski wants to merge 1 commit into
dowski/cap-max-sessionsfrom
dowski/compute-refresh-token-expiry
Draft

dowski wants to merge 1 commit into
dowski/cap-max-sessionsfrom
dowski/compute-refresh-token-expiry

Conversation

@dowski

@dowski dowski commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

This simplifies the schema and the behavior. With the old model, a previously issued refresh token could outlast a token issued under an updated (shortened) TTL. Now a presented token is compared against the current TTL and newly issued tokens will always last longer than previously issued ones.

This is a schema breaking change: refreshTokens.expiresAt is removed, so clear the auth/refreshTokens and auth/sessions tables before updating.

@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 22, 2026 •

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

commit: 7ddc492

@dowski
dowski force-pushed the dowski/compute-refresh-token-expiry branch from 2691f47 to 3f654c4 Compare October 23, 2026 21:15
@dowski
dowski force-pushed the dowski/cap-max-sessions branch from 966cbc9 to 061f061 Compare October 23, 2026 21:15
@dowski
dowski force-pushed the dowski/compute-refresh-token-expiry branch from 3f654c4 to 5658f9e Compare October 26, 2026 23:27
@dowski
dowski force-pushed the dowski/cap-max-sessions branch from 061f061 to 9aa3f57 Compare October 26, 2026 23:27
@dowski
dowski force-pushed the dowski/cap-max-sessions branch from 9aa3f57 to 7b4cb69 Compare October 26, 2026 23:44
@dowski
dowski force-pushed the dowski/compute-refresh-token-expiry branch from 5658f9e to c0c444a Compare October 26, 2026 23:44
@dowski
dowski force-pushed the dowski/cap-max-sessions branch from 7b4cb69 to d77819b Compare October 26, 2026 23:53
@dowski
dowski force-pushed the dowski/compute-refresh-token-expiry branch from c0c444a to af785e7 Compare October 26, 2026 23:53
@dowski
dowski force-pushed the dowski/compute-refresh-token-expiry branch from af785e7 to 82f3d10 Compare October 27, 2026 14:51
@dowski
dowski force-pushed the dowski/cap-max-sessions branch from d77819b to 50c7ed3 Compare October 27, 2026 14:51
…rent TTL

This simplifies the schema and the behavior. With the old model, a previously issued refresh token could outlast a token issued under an updated (shortened) TTL. Now a presented token is compared against the current TTL and newly issued tokens will always last longer than previously issued ones.

This branch was successfully deployed

1 active deployment
Preview – auth-v2 — 7ddc492e 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