[GH-ISSUE #3733] Docs update: import instructions for additional fields in organizations #18334

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

Originally created by @techjandro on GitHub (Aug 1, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3733

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Going to this part of the docs:
    https://www.better-auth.com/docs/plugins/organization#additional-fields

  2. In the section of infering types, it states:

import { createAuthClient } from "better-auth/client";
import { inferOrgAdditionalFields, organizationClient } from "better-auth/plugins/organization/client"
import type { auth } from "@/auth" // import the auth object type only
 
const client = createAuthClient({
    plugins: [organizationClient({
        schema: inferOrgAdditionalFields<typeof auth>()
    })]
})
  1. import { inferOrgAdditionalFields } from "better-auth/plugins/organization/client"
    doesn't work, should be:
    import { inferOrgAdditionalFields } from "better-auth/client/plugins";

Current vs. Expected behavior

Should state the right import path.

What version of Better Auth are you using?

1.3.4

Provide environment information

N/A

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

Documentation

Auth config (if applicable)

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

Additional context

No response

Originally created by @techjandro on GitHub (Aug 1, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3733 ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce 1. Going to this part of the docs: https://www.better-auth.com/docs/plugins/organization#additional-fields 2. In the section of infering types, it states: ``` import { createAuthClient } from "better-auth/client"; import { inferOrgAdditionalFields, organizationClient } from "better-auth/plugins/organization/client" import type { auth } from "@/auth" // import the auth object type only const client = createAuthClient({ plugins: [organizationClient({ schema: inferOrgAdditionalFields<typeof auth>() })] }) ``` 3. `import { inferOrgAdditionalFields } from "better-auth/plugins/organization/client"` doesn't work, should be: `import { inferOrgAdditionalFields } from "better-auth/client/plugins";` ### Current vs. Expected behavior Should state the right import path. ### What version of Better Auth are you using? 1.3.4 ### Provide environment information ```bash N/A ``` ### Which area(s) are affected? (Select all that apply) Documentation ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-15 16:45:53 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 1, 2025):

Hi @techjandro! I'm Dosu and I’m helping the better-auth team.

You're right—the correct import path for inferOrgAdditionalFields in Better Auth v1.3.4 is better-auth/client/plugins, not better-auth/plugins/organization/client. This is confirmed by the codebase and recent documentation updates, which show that both inferOrgAdditionalFields and organizationClient should be imported from better-auth/client/plugins for client usage see PR #3483.

If the docs still show the old import path, updating them is appropriate and aligns with how similar fixes have been handled in recent PRs. Here’s the correct import statement for your reference:

import { createAuthClient } from "better-auth/client";
import { inferOrgAdditionalFields, organizationClient } from "better-auth/client/plugins";
import type { auth } from "@/auth";

const client = createAuthClient({
  plugins: [
    organizationClient({
      schema: inferOrgAdditionalFields<typeof auth>()
    })
  ]
});

Thanks for catching this!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

<!-- gh-comment-id:3143659339 --> @dosubot[bot] commented on GitHub (Aug 1, 2025): <!-- Greeting --> Hi @techjandro! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> You're right—the correct import path for `inferOrgAdditionalFields` in Better Auth v1.3.4 is `better-auth/client/plugins`, not `better-auth/plugins/organization/client`. This is confirmed by the codebase and recent documentation updates, which show that both `inferOrgAdditionalFields` and `organizationClient` should be imported from `better-auth/client/plugins` for client usage [see PR #3483](https://github.com/better-auth/better-auth/pull/3483). If the docs still show the old import path, updating them is appropriate and aligns with how similar fixes have been handled in recent PRs. Here’s the correct import statement for your reference: ```ts import { createAuthClient } from "better-auth/client"; import { inferOrgAdditionalFields, organizationClient } from "better-auth/client/plugins"; import type { auth } from "@/auth"; const client = createAuthClient({ plugins: [ organizationClient({ schema: inferOrgAdditionalFields<typeof auth>() }) ] }); ``` Thanks for catching this! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0df00939-eb4e-43c4-b327-5bcd6c22bda0?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/3733)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#18334