fix: prevent cached auth responses from breaking page rereads - #25
Merged
Merged
Conversation
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.
A reader can pay successfully and then see “Request failed after maximum number of retries” after a cold wallet restart: the browser reuses a private, 60-second cached page response whose BRC-103 nonce belongs to the previous authentication session.
Mark canonical page responses
private, no-storeso every authenticated request receives a fresh signed response. Existing entitlements are reused without another payment; the separate token-authorized rendered-image route retains its cache policy. This changes no BRC100 calls or wire bytes and requires no SDK release.Validation: 40 tests, lint, typecheck and both builds pass. The regression test uses a browser-like private cache and three independent authentication sessions; the original policy fails and the new policy passes. Native cold reread and production rollout acceptance follow hosted CI and merge.