Fix field naming convention in auth plugin documentation#667
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix pnpm dev error by resolving invalid field keys
Fix field naming convention in auth plugin documentation
Feb 13, 2026
hotlong
marked this pull request as ready for review
February 13, 2026 16:05
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects field naming convention violations in the authentication plugin documentation. The ObjectStack protocol requires field names to use snake_case (enforced by regex /^[a-z_][a-z0-9_]*$/ in packages/spec/src/data/object.zod.ts:263), but the documentation incorrectly showed examples using camelCase field names (createdAt, updatedAt, emailVerified). The actual implementation already uses correct snake_case naming; this PR fixes only the documentation to match.
Changes:
- Updated all field name examples from camelCase to snake_case in README.md and authentication guide
- Revised narrative descriptions to clarify that ObjectStack's snake_case convention is used for field names, not better-auth's native camelCase
- Changed section title from "Migration from Other Systems" to "ObjectStack Field Naming" to better reflect the content
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/plugins/plugin-auth/README.md | Corrected all code examples and descriptions to show snake_case field names (email_verified, created_at, updated_at, user_id, expires_at, etc.) instead of camelCase |
| content/docs/guides/authentication.mdx | Updated field naming section to document ObjectStack's snake_case requirement and corrected field name examples |
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 showed camelCase field names (
createdAt,updatedAt,emailVerified) that violate ObjectStack's snake_case validation for field identifiers.Changes
packages/plugins/plugin-auth/README.md: Updated all code examples to use snake_case field namescontent/docs/guides/authentication.mdx: Corrected field naming section to reflect protocol requirementsCorrected Examples
Before:
After:
Implementation files already use correct snake_case. This fixes documentation only.
Original prompt
Created from VS Code.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.