docs: add OIDCHandler error table and Cache-Control response header notes#67
Merged
veverkap merged 3 commits intoApr 23, 2026
Conversation
…otes - Document Cache-Control: no-store + Pragma: no-cache on AuthHandler Signup, Login, and RefreshToken success responses - Document the same headers on MagicLinkHandler.VerifyMagicLink - Add structured error table for all OIDCHandler endpoints (Login, Callback, CreateLinkNonce, Link) — previously only the link-callback redirect outcomes were listed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates README handler documentation to close gaps discovered during an audit, focusing on response headers for token-issuing endpoints and adding a structured error table for OIDC flows.
Changes:
- Document
Cache-Control: no-storeandPragma: no-cacheon successfulAuthHandlertoken responses (Signup,Login,RefreshToken). - Document the same anti-caching headers on
MagicLinkHandler.VerifyMagicLinksuccess responses. - Add an OIDCHandler “Error responses” table to match the structure used by other handler sections.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds missing header notes for token responses and introduces an OIDC error-response table for consistency and completeness. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Clarify Callback 400 row: PKCE mismatch surfaces as 401, not 400 - Fix CreateLinkNonce row: show explicit 200 OK status - Broaden Link 409 row: covers any FindByID error, not just not-found
Kept main's expanded OIDC error table (link-flow redirects, CreateLinkNonce 500, Link 500) while preserving the accuracy fix for Link 409 to cover any FindByID error, not just user-not-found.
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
Three documentation gaps identified during a full audit of handler source code vs. README:
1.
Cache-Control: no-store/Pragma: no-cacheonAuthHandlerresponsesAuthHandler.Signup,Login, andRefreshTokenall set these headers in code (handler/auth.go:140,189,281) but the README's Response types section didn't mention them.APIKeyHandler.CreateandTOTPHandler.Generatealready had this documented — this bringsAuthHandlerinto parity.2. Same headers on
MagicLinkHandler.VerifyMagicLinkhandler/magiclink.go:125-126setsCache-Control: no-storeandPragma: no-cache, which was also unmentioned in the response types section.3. Missing
OIDCHandlererror tableEvery other handler section has a structured Error responses table, but
OIDCHandleronly had narrative paragraphs. This adds a table covering:Login500Callback400,401,500CreateLinkNonce200 OKLink400,401,409The existing redirect-outcome table and the two blockquote notes are preserved unchanged.
Files changed:
README.mdonly (+17 lines, -2 lines)Warning
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
Greptile Summary
Documentation-only update to
README.mdthat addsCache-Control: no-store/Pragma: no-cachenotes toAuthHandler(Signup,Login,RefreshToken) andMagicLinkHandler.VerifyMagicLink, and refines theLink409 Conflictcondition description in the OIDC error table. All three changes are verified accurate against the corresponding handler source files (handler/auth.go:140,189,281,handler/magiclink.go:125–126,handler/oidc.go:280).Confidence Score: 5/5
README-only change; all documented behaviors verified accurate against handler source code.
Every claim in the three updated paragraphs was cross-checked against the Go source. Previous P1 findings (inaccurate PKCE 400 description, misleading (none) status cell) were fixed in 523c1b1. No remaining P0/P1 issues.
No files require special attention.
Important Files Changed
Sequence Diagram
sequenceDiagram participant Client participant AuthHandler participant MagicLinkHandler Client->>AuthHandler: POST /signup or /login or /refresh AuthHandler-->>Client: 200/201 with Cache-Control: no-store and Pragma: no-cache Client->>MagicLinkHandler: GET /verify MagicLinkHandler-->>Client: 200 with Cache-Control: no-store and Pragma: no-cacheReviews (3): Last reviewed commit: "chore: merge origin/main and resolve REA..." | Re-trigger Greptile