[PR #5835] feat: add support for create and update input types #14509

Closed
opened 2026-04-13 09:30:45 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5835

State: closed
Merged: No


Summary by cubic

Adds action-based field input control to the DB schema. Fields can now be create-only or update-only, and the server enforces this for user updates.

  • New Features
    • DBFieldAttributeConfig.input now supports true | false | "create" | "update".
    • parseInputData enforces allowed fields based on the current action.
    • Applied to built-in plugins: phoneNumber is create-only; isAnonymous is not user-settable.
    • updateUser now rejects disallowed or unknown fields with clear errors (e.g., NO_FIELDS_TO_UPDATE, PHONENUMBER_IS_NOT_ALLOWED_TO_BE_SET).

Written for commit 49653031b4. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5835 **State:** closed **Merged:** No --- <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds action-based field input control to the DB schema. Fields can now be create-only or update-only, and the server enforces this for user updates. - **New Features** - DBFieldAttributeConfig.input now supports true | false | "create" | "update". - parseInputData enforces allowed fields based on the current action. - Applied to built-in plugins: phoneNumber is create-only; isAnonymous is not user-settable. - updateUser now rejects disallowed or unknown fields with clear errors (e.g., NO_FIELDS_TO_UPDATE, PHONENUMBER_IS_NOT_ALLOWED_TO_BE_SET). <sup>Written for commit 49653031b483a03a5d09fd83d8fb074b4c068947. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:30:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14509