Skip to content

Revoke all of a user's sessions on email password recovery - #779

Merged
dowski merged 1 commit into
rebootfrom
dowski/revoke-sessions-on-password-recovery
Oct 28, 2026
Merged

dowski merged 1 commit into
rebootfrom
dowski/revoke-sessions-on-password-recovery

Conversation

@dowski

@dowski dowski commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

This is accomplished via a new ctx.convexAuth.revokeAllSessions(userId)
helper, which revokes every session for the given userId.

That function is only available to authentication methods. It is only meant
to be called when confirming via some other means that all sessions for
userId should be deleted (e.g. after proof that the associated email address
was just verified).

It's used that way in completePasswordRecovery, which calls it after setting
the new password and before minting the new session.

@vercel

vercel Bot commented Oct 21, 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:52pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
convex-auth-docs Ignored Ignored Oct 27, 2026 3:52pm UTC

Request Review

dowski commented Oct 21, 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@779

commit: 98c0415

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.

Re-trigger cubic

@dowski
dowski force-pushed the dowski/revoke-sessions-on-password-recovery branch from b6bf24b to 235036d Compare October 26, 2026 23:27
@dowski
dowski force-pushed the dowski/revoke-session-handle branch from fcde1bf to 201b3bd Compare October 26, 2026 23:27
@dowski
dowski force-pushed the dowski/revoke-session-handle branch from 201b3bd to 957d13b Compare October 26, 2026 23:44
@dowski
dowski force-pushed the dowski/revoke-sessions-on-password-recovery branch from 235036d to 598fd10 Compare October 26, 2026 23:44
@dowski
dowski force-pushed the dowski/revoke-session-handle branch 2 times, most recently from 520e0ba to 2a03112 Compare October 26, 2026 23:50
@dowski
dowski force-pushed the dowski/revoke-sessions-on-password-recovery branch from 598fd10 to 230980a Compare October 26, 2026 23:52
@dowski
dowski force-pushed the dowski/revoke-session-handle branch from 2a03112 to adf014c Compare October 27, 2026 14:51
@dowski
dowski force-pushed the dowski/revoke-sessions-on-password-recovery branch from 230980a to 50e1224 Compare October 27, 2026 14:51
@dowski
dowski changed the base branch from dowski/revoke-session-handle to graphite-base/779 October 27, 2026 15:00
@dowski
dowski force-pushed the dowski/revoke-sessions-on-password-recovery branch from 50e1224 to 12672cb Compare October 27, 2026 15:02
@dowski
dowski force-pushed the graphite-base/779 branch from adf014c to 09915cc Compare October 27, 2026 15:02
@cursor
cursor Bot changed the base branch from graphite-base/779 to reboot October 27, 2026 15:03
@dowski
dowski force-pushed the dowski/revoke-sessions-on-password-recovery branch from 12672cb to 8dd4293 Compare October 27, 2026 15:03
Add ctx.convexAuth.revokeAllSessions(userId), which revokes every session of
a user without needing a signed-in caller, for flows that prove ownership
another way. completePasswordRecovery calls it after setting the new
password and before minting the new session, so a recovery after an account
takeover signs out whoever knew the old password.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dowski
dowski merged commit e071497 into reboot Oct 28, 2026
9 checks passed

This branch was successfully deployed

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

2 participants