[PR #6747] [MERGED] feat: add additionalFields option in verification table schema #32462

Closed
opened 2026-04-17 23:16:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6747
Author: @noctarius
Created: 12/14/2025
Status: Merged
Merged: 12/15/2025
Merged by: @himself65

Base: canaryHead: fix-6629


📝 Commits (3)

  • f22beff Fixed #6629: additionalFields missing in verification table schema
  • 9737f32 Fixed code style (tabs instead of spaces)
  • 603e45c Added unit test to ensure the additional fields are merged correctly

📊 Changes

3 files changed (+31 additions, -1 deletions)

View changed files

📝 packages/core/src/db/get-tables.ts (+4 -1)
📝 packages/core/src/db/test/get-tables.test.ts (+21 -0)
📝 packages/core/src/types/init-options.ts (+6 -0)

📄 Description

This PR fixes #6629 where the additionalFields property is missing on the options definition. Accordingly, the additional fields, if defined, aren't merged into the database values before sent to the database adapter.

Solution

The options definition is extended to include the additionalFields property for verification. Afterwards, the fields are merged into the database schema definition.


🔄 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/6747 **Author:** [@noctarius](https://github.com/noctarius) **Created:** 12/14/2025 **Status:** ✅ Merged **Merged:** 12/15/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix-6629` --- ### 📝 Commits (3) - [`f22beff`](https://github.com/better-auth/better-auth/commit/f22beff561db09129a4e007d4ec7a9b596a5e0ad) Fixed #6629: additionalFields missing in verification table schema - [`9737f32`](https://github.com/better-auth/better-auth/commit/9737f324da570c0ab8961d772894c163ac33f816) Fixed code style (tabs instead of spaces) - [`603e45c`](https://github.com/better-auth/better-auth/commit/603e45c3ce2d0f103496140da4d870306dc71c61) Added unit test to ensure the additional fields are merged correctly ### 📊 Changes **3 files changed** (+31 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/db/get-tables.ts` (+4 -1) 📝 `packages/core/src/db/test/get-tables.test.ts` (+21 -0) 📝 `packages/core/src/types/init-options.ts` (+6 -0) </details> ### 📄 Description This PR fixes #6629 where the additionalFields property is missing on the options definition. Accordingly, the additional fields, if defined, aren't merged into the database values before sent to the database adapter. ## Solution The options definition is extended to include the additionalFields property for verification. Afterwards, the fields are merged into the database schema definition. --- <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-17 23:16:01 -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#32462