[PR #3723] [MERGED] feat: return false from generateId to imply database-generated ID #4973

Closed
opened 2026-03-13 12:05:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3723
Author: @aleclarson
Created: 7/31/2025
Status: Merged
Merged: 8/1/2025
Merged by: @Bekacru

Base: mainHead: feat/generateId-false


📝 Commits (3)

  • 4e3200e feat: return false from generateId to imply database-generated ID
  • e6a9544 chore: add changeset
  • 4fbe563 chore: update changeset

📊 Changes

4 files changed (+9 additions, -3 deletions)

View changed files

.changeset/funny-rules-rest.md (+5 -0)
📝 packages/better-auth/src/init.ts (+1 -1)
📝 packages/better-auth/src/plugins/anonymous/index.ts (+2 -1)
📝 packages/better-auth/src/types/options.ts (+1 -1)

📄 Description

Change the return type of the advanced.database.generateId option to accept false, which implies a database-generated identifier. The logic for handling the false result was already present.


Summary by cubic

Updated the generateId option to allow returning false, signaling that the database should generate the ID instead of the application.


🔄 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/3723 **Author:** [@aleclarson](https://github.com/aleclarson) **Created:** 7/31/2025 **Status:** ✅ Merged **Merged:** 8/1/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/generateId-false` --- ### 📝 Commits (3) - [`4e3200e`](https://github.com/better-auth/better-auth/commit/4e3200e8f49901b895cd44abfa6bbb26c04e761b) feat: return false from generateId to imply database-generated ID - [`e6a9544`](https://github.com/better-auth/better-auth/commit/e6a95447320d43ac7d618faebb68004849792df4) chore: add changeset - [`4fbe563`](https://github.com/better-auth/better-auth/commit/4fbe5634f10bf02d469324f025bfc987e493e09d) chore: update changeset ### 📊 Changes **4 files changed** (+9 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/funny-rules-rest.md` (+5 -0) 📝 `packages/better-auth/src/init.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/anonymous/index.ts` (+2 -1) 📝 `packages/better-auth/src/types/options.ts` (+1 -1) </details> ### 📄 Description Change the return type of the `advanced.database.generateId` option to accept `false`, which implies a database-generated identifier. The logic for handling the false result was already present. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Updated the generateId option to allow returning false, signaling that the database should generate the ID instead of the application. <!-- 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-03-13 12:05:59 -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#4973