[GH-ISSUE #1852] "name" is deprecated but still required in Better Auth sign-up #26268

Closed
opened 2026-04-17 16:45:20 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Egon15 on GitHub (Mar 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1852

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Create a backend using Better Auth with MongoDB.
  2. Implement a frontend and attempt to sign up a user with authClient.signUp.email().
  3. The error occurs:
    TypeScript throws an error stating that name is missing but still required.
    However, name is also marked as deprecated, creating a conflict.

Current vs. Expected behavior

Current Behavior:

  • TypeScript enforces name as a required field.
  • However, name is marked deprecated, making it unclear how to proceed.

Expected Behavior:

  • Either name should not be required, or
  • The deprecation warning should be removed if it's still needed.

What version of Better Auth are you using?

1.2

Provide environment information

OS: Linux (Ubuntu)
Framework: Next.js

Which area(s) are affected? (Select all that apply)

Backend, Client, Types, Package

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

  • The issue occurs both locally and online.
  • It is unclear how to proceed since the name field is both required and deprecated at the same time.
  • Any workaround suggestions would be helpful.
Originally created by @Egon15 on GitHub (Mar 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1852 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Create a backend using Better Auth with MongoDB. 2. Implement a frontend and attempt to sign up a user with authClient.signUp.email(). 3. The error occurs: TypeScript throws an error stating that name is missing but still required. However, name is also marked as deprecated, creating a conflict. ### Current vs. Expected behavior **Current Behavior:** - TypeScript enforces name as a required field. - However, name is marked deprecated, making it unclear how to proceed. **Expected Behavior:** - Either name should not be required, or - The deprecation warning should be removed if it's still needed. ### What version of Better Auth are you using? 1.2 ### Provide environment information ```bash OS: Linux (Ubuntu) Framework: Next.js ``` ### Which area(s) are affected? (Select all that apply) Backend, Client, Types, Package ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context - The issue occurs both locally and online. - It is unclear how to proceed since the name field is both required and deprecated at the same time. - Any workaround suggestions would be helpful.
GiteaMirror added the lockedbug labels 2026-04-17 16:45:20 -05:00
Author
Owner

@ping-maxwell commented on GitHub (Mar 21, 2025):

Name is not deprecated. It's likely you're seeing the default name value from the web, which is marked as deprecated:

Image

Just provide a name value and you'll be fine.

<!-- gh-comment-id:2744487616 --> @ping-maxwell commented on GitHub (Mar 21, 2025): Name is not deprecated. It's likely you're seeing the default `name` value from the web, which **is** marked as deprecated: <img width="654" alt="Image" src="https://github.com/user-attachments/assets/6ea147b8-faf4-4c79-a8cd-507bb6f006ed" /> Just provide a name value and you'll be fine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#26268