Repository navigation
fix(account): Day 6 review gate, web lane fixes - #193
Merged
Merged
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…or the root passkey, grant resend, ordered Apple notices - M7: a Play subscription grants only the product Google names (lineItems[0].productId), on purchases and on Pub/Sub notifications (422 transaction_invalid otherwise) - M2 (sign-in part): registering the root passkey before the key log needs a sign-in at most 300 s old (401 reauth_required), at options and at verify - leads: login codes of a deleted account are refused and deleted with it; a web email start without Turnstile stores a code row either way, so verify answers alike with and without an account; a store grant is pending in the same write as the entitlement and a job resends a lost or refused plan.changed under the same event id - hardening: the method.add step-up names the new sign-in (params.subject), so an approval cannot add a different identity; Apple server notices apply in order, so a late consent-revoked cannot end a newer session or token
… events kept; grants for a product the stage never calls are dropped, not retried
…l start without Turnstile takes the same least time whether it mails or not
…rovals as well as deletion
… login code test sends the viewer address
WillCybertron
force-pushed
the
fix/account-web-gate
branch
from
November 12, 2026 09:31
b8b51c8 to
0caf2d9
Compare
…dds, which every request needs since #191
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.
The Account-web lane's items from the Day 6 review gate (
docs/mobile/review/GATE-REPORT.mdin the meta repo). Each fix has a test that fails without it.Fixes
store.tsfromPlay): a Play purchase grants only the product Google names. A subscription'slineItems[0].productId(a one-time product'sproductId) must equal the claimed SKU, else 422transaction_invalid, onPOST /v1/purchasesand on Pub/Sub notifications. Test:payments.test.ts"M7: a Play subscription token grants only the product Google names".signin.ts): registering the root passkey while the account has no key log needs a sign-in at most 300 s old (auth_time), at/v1/auth/passkey/optionsand at/verify: 401reauth_required. Core'sfreshSignIndoes the check; the genesis part is Account-core's (fix(account): gate M1, M2 and M3 with hardening: product pin on the verified DID, a viewer address on every request, fresh device-bound genesis with a notice, no tokens for deleted accounts #191). Test:signin-web.test.ts"M2: a session older than 5 minutes cannot register the root passkey".signin.ts,deletion.ts):redeemLoginCoderefuses a deleted account and deletion deletes its login codes. Sessions and refresh tokens already go with the account (fix(account): SMA's Ed25519 key test; retention for sign-in rows, rate counters, sessions and push tokens #183);rotateandaccessTokencheckdeleted_atsince Account-core's fix(account): gate M1, M2 and M3 with hardening: product pin on the verified DID, a viewer address on every request, fresh device-bound genesis with a notice, no tokens for deleted accounts #191. Test: "lead: a login code of a deleted account is refused".signin.ts): a web start without Turnstile stores a code row for every address and mails only an existing email sign-in, so verify answers alike with and without an account (403turnstile_required, then 401code_invalid). The per-address limit now counts both alike too, and such a start answers after at least 1 s either way, so the mail's latency does not tell either. Test: "lead: a web email start without Turnstile answers alike".store.ts,jobs.ts,schema.sql): the entitlement row carries its pendingplan.changed(event id,delivered_at) in the same statement, and the newgrantsjob resends a lost or refused one under the same event id (1 minute doubling, at most an hour) until the product takes it. An owner without a key log waits for it; a deleted owner, or a product the stage never calls, is dropped.outbound.tsis unchanged. Test:payments.test.ts"lead: a refused or lost plan.changed is resent".stepup.ts,methods.ts,openapi.yaml): the step-up params are{type, subject}, the new sign-in's Apple or Googlesub, email or passkey credential id, and the added method must be exactly that one. No client callsmethod.addyet. Test:methods.test.ts"gate hardening: the method.add approval names the new sign-in".signin.ts,apple.ts): applied inevent_timeorder (seconds, as in Apple's documented example, or milliseconds); aconsent-revokedends only the Apple sessions and tokens that existed when Apple sent it. Test:signin-web.test.ts"hardening: Apple server notices apply in order".Decisions
Grant delivery lives on the entitlement row, not in core's
outbox. The outbox drops a 4xx and gives up after 24 hours; a paid plan must reach the product, so a grant retries until it is taken.stepup.tsis Account-core's file; the change is the onemethod.addcase the gate report names.Found on main: since fix(account): gate M1, M2 and M3 with hardening: product pin on the verified DID, a viewer address on every request, fresh device-bound genesis with a notice, no tokens for deleted accounts #191 every request needs
x-oe-viewer-address, and the browser checks' request bridges never set it, so both failed. They now set it the way CloudFront's viewer-request function does.Checks
scripts/verify.shgreen in the pre-push hook.