docs(http): Sanctum XSRF gotcha — closes queue #22 docs path#75
Merged
Conversation
Deploying fs-packages with
|
| Latest commit: |
2661e37
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://420842c5.fs-packages.pages.dev |
| Branch Preview URL: | https://armorer-queue-22-xsrf-sanctu.fs-packages.pages.dev |
Add an Authentication & XSRF section to docs/packages/http.md sibling- level to the Doctrine #8 Timeout block, naming Laravel Sanctum SPA explicitly, explaining the XSRF-TOKEN cookie + axios 1.x withXSRFToken mechanics, and stating the HTTP 419 failure mode (which mocked transports do not surface, per ADR-0017). Stateless / token / non- Sanctum stacks documented as the inverse case. Expand the API Reference row for options.withXSRFToken with the same guidance and a cross-link to the new section. Add a one-line README pointer mirroring the Timeout pointer shape landed by Engineer PR #68 (no full duplication; docs page is source of truth). Closes enforcement queue #22 docs path. Commander disposition: docs- only. Library default of withXSRFToken: false stays as-is. No oxlint call-site rule. No source code changes. No version bump. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c6c9af2 to
eadce3f
Compare
jasperboerhof
approved these changes
May 12, 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.
Summary
Surface the fs-http × Laravel Sanctum SPA ×
withXSRFTokeninteraction explicitly on the docs site so future consumer adoptions don't repeat the entreezuil 419 cascade. Closes enforcement queue #22.Commander disposition: docs-only path. Library default
withXSRFToken: falsestays as-is. No oxlint call-site rule. No source code changes. No version bump on fs-http.Changes
docs/packages/http.md— new## Authentication & XSRFsection, sibling-level to## Timeout(both are surface-defaults discussions). Names Laravel Sanctum SPA explicitly, explains the cookie /X-XSRF-TOKENheader mechanics, calls out HTTP 419 as the failure mode by name, points out that mocked transports (per ADR-0017) hide it, and documents the stateless / token / non-Sanctum case as the inverse.docs/packages/http.md— API Reference table row foroptions.withXSRFTokenexpanded from the original one-line description with the Sanctum vs stateless guidance + an in-page cross-link to the new section.packages/http/README.md— one-line### Authentication & XSRFpointer mirroring the Timeout pointer shape landed by Engineer PR docs(fs-http): surface Doctrine #8 timeout contract; collapse README duplication #68. README/docs duplication discipline preserved (docs page is source of truth).docs/architecture.md— not touched. The architecture doc has no auth surface (no mentions ofwithCredentials,XSRF,Sanctum, orcsrfanywhere), so per scope D the cross-reference was skipped — don't invent a section just to add a link.Verification
Local gates run, all green:
npm run format:check— 133 files, all formatted.npm run lint— 0 warnings, 0 errors (oxlint, 95 rules).npm run docs:build— VitePress SSR completes in ~6s, no errors.id="authentication-xsrf"matching the README pointer URLhttps://packages.script.nl/packages/http#authentication-xsrf. Custom warning block renders, code block has syntax highlighting.Skipped: mutation, test:coverage, audit, lint:pkg (no source/manifest changes).
Test plan
/packages/http#authentication-xsrfwith custom-block warning styling intact.#authentication-xsrfslug, generated by VitePress from heading text).## Timeout, both expand on Configuration topics) reads naturally in the page outline.🤖 Generated with Claude Code