[PR #3259] [MERGED] feat(anonymous): Allow async functions for generating names when using the anonymous auth plugin #4724

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3259
Author: @btx-systems
Created: 7/4/2025
Status: Merged
Merged: 7/4/2025
Merged by: @Bekacru

Base: mainHead: feat/async-anonymous-name-generation


📝 Commits (1)

  • 65aca0b feat(anonymous): update generateName to support async function return type

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/plugins/anonymous/index.ts (+2 -2)

📄 Description

Allows the use of async functions with the generateName callback for the anonymous authentication plugin.

Changes:

  • Changed generateName type on AnonymousOptions to support returning a promise
  • Added await to the options.generateName call in the auth endpoint

🔄 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/3259 **Author:** [@btx-systems](https://github.com/btx-systems) **Created:** 7/4/2025 **Status:** ✅ Merged **Merged:** 7/4/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/async-anonymous-name-generation` --- ### 📝 Commits (1) - [`65aca0b`](https://github.com/better-auth/better-auth/commit/65aca0ba5614d8e3a96c140961743623d314901c) feat(anonymous): update generateName to support async function return type ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/anonymous/index.ts` (+2 -2) </details> ### 📄 Description Allows the use of async functions with the generateName callback for the anonymous authentication plugin. Changes: - Changed generateName type on AnonymousOptions to support returning a promise - Added await to the options.generateName call in the auth endpoint --- <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:57: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#4724