[docs] Update documentation for features from 2026-05-23#347
Merged
Conversation
…n, and PasswordReset handlers Add Validate() call examples and descriptions to the Configuration sections of api-keys.md, email-verification.md, and password-reset.md, matching the existing pattern in magic-links.md and totp.md. Triggered by #340 which added Validate() to these three handlers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…plicate code blocks email-verification.md and password-reset.md each had two descriptions of Validate() that disagreed on which fields are required. The inline note omitted SendEmail/SendResetEmail, the secondary paragraph was correct but included a duplicate code block. Consolidate into a single accurate description listing all three required fields with the descriptive error message format.
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.
Documentation Updates - 2026-05-23
This PR updates the documentation based on features merged in the last 24 hours.
Features Documented
Validate()startup checks forAPIKeyHandler,EmailVerificationHandler, andPasswordResetHandler(from Add fail-fast Validate() checks to EmailVerification, PasswordReset, and APIKey handlers #340)📝 Detailed Changes & References
Changes Made
docs/handler/api-keys.md— addedh.Validate()call to Configuration example and note explaining thatAPIKeysandURLParamFuncare required; nilURLParamFuncwould cause a runtime panic onDeletedocs/handler/email-verification.md— addedh.Validate()call to Configuration example and note explaining thatUsersandVerificationsare requireddocs/handler/password-reset.md— addedh.Validate()call to Configuration example and note explaining thatUsersandResetsare requiredMerged PRs Referenced
Validate()checks toEmailVerification,PasswordReset, andAPIKeyhandlersSkipped Issues
No open documentation issues found.
Notes
The
Validate()pattern already existed inmagic-links.mdandtotp.md; these changes bring the remaining three handlers to parity.Add this agentic workflows to your repo
To install this agentic workflow, run
Greptile Summary
This PR consolidates the
Validate()startup-check documentation acrossAPIKeyHandler,EmailVerificationHandler, andPasswordResetHandler, bringing them to parity with the existing pattern inmagic-links.mdandtotp.md. The previously flagged duplicate code blocks and contradictory field lists inemail-verification.mdandpassword-reset.mdare resolved.api-keys.md: Merges the separateValidate()code block into the main configuration snippet; the prose description no longer listsAPIKeysas a required field (onlyURLParamFuncappears in the example error), which is inconsistent with how the other two handlers document their validated fields.email-verification.md: Removes duplicateh.Validate()block and unifies the field list to correctly name all three required fields (Users,Verifications,SendEmail).password-reset.md: Same consolidation — singleh.Validate()block, corrected field list (Users,Resets,SendResetEmail), pre-existing Behaviour-section warning retained.Confidence Score: 5/5
Documentation-only changes; no runtime code is modified. Safe to merge.
All three files are pure Markdown documentation. The
email-verification.mdandpassword-reset.mdchanges are clean and correct. Theapi-keys.mdchange drops an explicit mention ofAPIKeysas a required field from theValidate()description, leaving it slightly inconsistent with the other handlers, but this does not affect runtime behavior.docs/handler/api-keys.md — the
Validate()description no longer listsAPIKeysas a required field.Important Files Changed
Validate()code block into the main configuration block;APIKeysis no longer listed as a required field in theValidate()description, unlike the other two handlers.Validate()blocks and contradictory field lists into a single, correct description; all three required fields (Users,Verifications,SendEmail) are now listed.Validate()block and contradictory field list; single note now correctly listsUsers,Resets, andSendResetEmail.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Server Startup] --> B["h.Validate()"] B --> C{All required\nfields set?} C -- No --> D["log.Fatal(err)\nDescriptive error message"] C -- Yes --> E[Mount handler routes] subgraph APIKeyHandler F["APIKeys (required)"] G["URLParamFunc (required)"] H["Prefix (optional)"] end subgraph EmailVerificationHandler I["Users (required)"] J["Verifications (required)"] K["SendEmail (required)"] L["TokenTTL (optional)"] end subgraph PasswordResetHandler M["Users (required)"] N["Resets (required)"] O["SendResetEmail (required)"] P["TokenTTL / RateLimiter (optional)"] end APIKeyHandler --> B EmailVerificationHandler --> B PasswordResetHandler --> BComments Outside Diff (2)
docs/handler/email-verification.md, line 20-32 (link)Validate()block and contradictory field listThe new content (lines 15–20) and the pre-existing content (lines 24–32) now both tell readers to call
h.Validate(), showing two separate identical code examples in the same section. Worse, the two descriptions disagree on what the function actually checks: line 20 says onlyUsersandVerificationsare required, while line 24 says all three fields (Users,Verifications,SendEmail) are checked. A reader relying on the new note will thinkSendEmailis not validated and may omit it in a non-test setup. The old standalone paragraph and its code block should be removed, and the single remaining note should reflect the actual set of fields checked byValidate().Prompt To Fix With AI
docs/handler/password-reset.md, line 21-34 (link)Validate()block and contradictory field listThe newly added note on line 21 says
Validateonly checksUsersandResets, but the pre-existing paragraph on line 26 says it catches all three required fields (Users,Resets,SendResetEmail), and a second identicalh.Validate()code block appears on lines 29–31. A developer reading only the new note would concludeSendResetEmailis not a required field, potentially shipping a handler that returns HTTP 503 on every reset request. The old standalone paragraph and its code block should be removed, with the inline note updated to list all fields actually validated byValidate().Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (3): Last reviewed commit: "docs(handler): fix contradictory Validat..." | Re-trigger Greptile