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

Closed
opened 2026-04-15 21:31:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5835
Author: @Bekacru
Created: 11/7/2025
Status: Closed

Base: canaryHead: feat/input


📝 Commits (1)

  • 4965303 feat: add support for and values for

📊 Changes

6 files changed (+89 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/api/routes/update-user.test.ts (+21 -0)
📝 packages/better-auth/src/db/schema.ts (+1 -1)
📝 packages/better-auth/src/plugins/anonymous/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/phone-number/index.ts (+2 -0)
📝 packages/better-auth/src/plugins/phone-number/phone-number.test.ts (+55 -0)
📝 packages/core/src/db/type.ts (+9 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5835 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 11/7/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat/input` --- ### 📝 Commits (1) - [`4965303`](https://github.com/better-auth/better-auth/commit/49653031b483a03a5d09fd83d8fb074b4c068947) feat: add support for and values for ### 📊 Changes **6 files changed** (+89 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/update-user.test.ts` (+21 -0) 📝 `packages/better-auth/src/db/schema.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/anonymous/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/phone-number/phone-number.test.ts` (+55 -0) 📝 `packages/core/src/db/type.ts` (+9 -1) </details> ### 📄 Description <!-- 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. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:31:28 -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#23163