[PR #3312] [CLOSED] feat: add custom user schema support #4750

Closed
opened 2026-03-13 11:58:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3312
Author: @saintparish4
Created: 7/8/2025
Status: Closed

Base: mainHead: feat/custom-user-schema


📝 Commits (1)

  • 1e9180c feat: add custom user schema support

📊 Changes

9 files changed (+710 additions, -7 deletions)

View changed files

docs/.env.example (+0 -1)
📝 docs/content/docs/reference/options.mdx (+10 -0)
📝 docs/package.json (+1 -1)
examples/custom-schema.ts (+249 -0)
📝 packages/better-auth/src/adapters/kysely-adapter/test/state.txt (+1 -1)
packages/better-auth/src/types/custom-schema-integration.test.ts (+205 -0)
packages/better-auth/src/types/models.test.ts (+168 -0)
📝 packages/better-auth/src/types/models.ts (+47 -3)
📝 packages/better-auth/src/types/options.ts (+29 -1)

📄 Description

  • Allow options.user.schema to override default user schema
  • Maintain backward compatibility with additionalFields
  • Update TypeScript inference for custom schemas
  • Add comprehensive tests and examples
  • Update documentation with schema option
  • Create detailed example file with various use cases

🔄 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/3312 **Author:** [@saintparish4](https://github.com/saintparish4) **Created:** 7/8/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/custom-user-schema` --- ### 📝 Commits (1) - [`1e9180c`](https://github.com/better-auth/better-auth/commit/1e9180c86d3d137c63bd97c016b6d2717f6c55d4) feat: add custom user schema support ### 📊 Changes **9 files changed** (+710 additions, -7 deletions) <details> <summary>View changed files</summary> ➖ `docs/.env.example` (+0 -1) 📝 `docs/content/docs/reference/options.mdx` (+10 -0) 📝 `docs/package.json` (+1 -1) ➕ `examples/custom-schema.ts` (+249 -0) 📝 `packages/better-auth/src/adapters/kysely-adapter/test/state.txt` (+1 -1) ➕ `packages/better-auth/src/types/custom-schema-integration.test.ts` (+205 -0) ➕ `packages/better-auth/src/types/models.test.ts` (+168 -0) 📝 `packages/better-auth/src/types/models.ts` (+47 -3) 📝 `packages/better-auth/src/types/options.ts` (+29 -1) </details> ### 📄 Description - Allow options.user.schema to override default user schema - Maintain backward compatibility with additionalFields - Update TypeScript inference for custom schemas - Add comprehensive tests and examples - Update documentation with schema option - Create detailed example file with various use cases --- <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-03-13 11:58:34 -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#4750