Repository navigation
feat(recovery): deliver recovery notices through the adapter, and cancel from a session - #500
Merged
Merged
Conversation
…cel from a session /recovery/verify returns the opened notices as deliveries to a credentialed caller that lists account_notice_email / account_notice_sms in x-seamless-auth-delivery-kinds; the manifest marks the route notices: true. Callers that do not list the kinds still get the fail-closed 503, so an older adapter never receives a kind it would drop. The recovery code carries purpose account_recovery. GET /recovery/requests and DELETE /recovery/requests/:id let a signed-in owner see and cancel open requests without the token. Updates @seamless-auth/types to 0.31.0. Closes #499
This was referenced Oct 25, 2026
fix: bring the Go adapter to parity with the Python and Rust adapters
fells-code/seamless-auth-go#11
Closed
This was referenced Oct 25, 2026
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.
Closes #499. Follow-up to #497 / #498. Updates
@seamless-auth/typesto 0.31.0.Recovery notices through the adapter
#498 made
/recovery/verifyfail closed when no owner notice goes out. Deployments whose adapter owns delivery therefore could not use recovery. Now:sendAccountNoticecan return a notice as a delivery payload instead of sending it:account_notice_email/account_notice_smsfrom types 0.31, withnotice: 'account_recovery_opened'and thecancelUrl. A returned notice counts as notifying the owner (returned_for_external_delivery).x-seamless-auth-delivery-kindsheader. Without the header, external delivery still recordsnot_sent_external_delivery, and verify still answers 503.v0.4.0has a manifest catch-all) already forward/recovery/verify, and their delivery switch logs an unknown kind and drops it. Returning notices to them would bring fix(recovery): do not open an account recovery request unless the owner was notified #497 back./recovery/verifyresponds withdeliveries: AuthDeliveryInstruction[](API-localAccountRecoveryVerifyResponseSchema). The adapter manifest marks itnotices: true, a new optional field that older adapters'parseAdapterManifestignores.registerAdapterRouterefusesnoticeson a route whose response has nodeliveries./recovery/startcarriespurpose: 'account_recovery'under external delivery. Older adapters ignore the field and still deliver the code.Cancel from a signed-in session
GET /recovery/requests(access): the account's open requests{ id, channel, state, requestedAt, completesAt }.DELETE /recovery/requests/:id(access): cancels one without the token. It is scoped to the user, so another account's id gets 404, and it logsaccount_recovery_cancelledwithvia: 'session'.enrollment_required).Contract / ripple
x-seamless-auth-delivery-kinds, new manifest fieldnotices, newdeliveriesfield on/recovery/verify, and two new access routes.x-seamless-auth-delivery-kinds: account_notice_email,account_notice_smsonnotices: trueroutes and deliver every item indeliveries.Checks
npm run typecheck,npm run lint,npm run format:check: passnpm run coverage: 2350 passed, all files 98.91 / 95.31 / 99.24 / 99.11tests/postgres/accountRecovery.spec.ts, with a new list/cancel ownership case, run against a scratch Postgres with the full migration chain: 4 passed