Repository navigation
Conversation
Removing a passkey left every session signed in from that device valid until it expired. DELETE /users/credentials now revokes the account's other sessions and keeps the one that made the request, which has just passed a step-up.
…passkey Follows the caller to the current head of its sign-in, including the parent an exchanged session came from, runs at least two passes so a replacement a racing rotation inserted is caught, and revokes before the delete so a failure leaves the passkey in place for a retry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #600 (L-API-1).
DELETE /users/credentialsalready requires a fresh step-up (#620). This adds the other half of L-API-1: removing a passkey now signs out every other session on the account.What changes
revokeOtherSessionsinsrc/services/sessionRevocation.tsrevokes the user's chain-head sessions, except the head of the caller's own sign-in. Exchanged sessions end with their parent, as they already do.credential_deleted. Thecredentials_deletedaudit event recordsrevokedSessions.Contract
No route, schema or status code changes. Only the route's OpenAPI description changes, and
openapi.jsonandsrc/generated/api.tsare regenerated. Access tokens that an adapter verifies locally stay valid until they expire, as they do for any revoke.Tests
tests/postgres/sessionRevocation.spec.ts): other heads are revoked and the caller's chain and other users are kept, a racing rotation cannot claim its session, and an exchanged caller keeps its parent's rotated head.