[Feature Request] addition of defaultTeam.name, documentation #2717

Open
opened 2026-03-13 10:15:07 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @volatileConst on GitHub (Jan 16, 2026).

Is this suited for github?

  • Yes, this is suited for github

Two problems:


  1. I could not find documentation on this flag - "teams.defaultTeam.enabled"

https://github.com/better-auth/better-auth/blob/canary/packages/better-auth/src/plugins/organization/routes/crud-org.ts#L243

under
https://www.better-auth.com/docs/plugins/organization

Is this documented elsewhere, or is this intended?


  1. Our flow involves

Create a default org → teams.defaultTeam.enabled → create the defaultTeam with a different team name from the org name

This snippet, https://github.com/better-auth/better-auth/blob/canary/packages/better-auth/src/plugins/organization/routes/crud-org.ts#L245C5-L258C9

let teamData = {
	organizationId: organization.id,
	name: `${organization.name}`,
	createdAt: new Date(),
};
if (options?.organizationHooks?.beforeCreateTeam) {
	const response = await options?.organizationHooks.beforeCreateTeam({
		team: {
			organizationId: organization.id,
			name: `${organization.name}`,
		},
		user,
		organization,
	});

doesn't allow us to separately pass a defaultTeam name.

Describe the solution you'd like

  1. Documentation of the "defaultTeam" option in the organization page.

  2. add a flag like options.teams.defaultTeam.name to pass the team name.

Describe alternatives you've considered

  1. Change the team name after it is created in client side, do some dbquery hackery to change the team name before onboarding etc.

Additional context

No response

Originally created by @volatileConst on GitHub (Jan 16, 2026). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Two problems: ----------------------------------------------------------------------------- 1. I could not find documentation on this flag - "teams.defaultTeam.enabled" https://github.com/better-auth/better-auth/blob/canary/packages/better-auth/src/plugins/organization/routes/crud-org.ts#L243 under https://www.better-auth.com/docs/plugins/organization Is this documented elsewhere, or is this intended? ----------------------------------------------------------------------------- 2. Our flow involves Create a default org → teams.defaultTeam.enabled → create the defaultTeam with a different team name from the org name This snippet, https://github.com/better-auth/better-auth/blob/canary/packages/better-auth/src/plugins/organization/routes/crud-org.ts#L245C5-L258C9 ``` let teamData = { organizationId: organization.id, name: `${organization.name}`, createdAt: new Date(), }; if (options?.organizationHooks?.beforeCreateTeam) { const response = await options?.organizationHooks.beforeCreateTeam({ team: { organizationId: organization.id, name: `${organization.name}`, }, user, organization, }); ``` doesn't allow us to separately pass a defaultTeam name. ### Describe the solution you'd like 1. Documentation of the "defaultTeam" option in the organization page. 2. add a flag like options.teams.defaultTeam.name to pass the team name. ### Describe alternatives you've considered 2. Change the team name after it is created in client side, do some dbquery hackery to change the team name before onboarding etc. ### Additional context _No response_
GiteaMirror added the enhancementdocumentation labels 2026-03-13 10:15:07 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 16, 2026):

It seems you're requesting documentation about the teams.defaultTeam.enabled feature, along with the addition of a flag like options.teams.defaultTeam.name for specifying the team name during organization creation.

  1. Regarding the documentation for teams.defaultTeam.enabled, it's been noted that there isn't specific documentation readily available in the provided links. This flag is part of a broader discussion around team features in Better Auth, and there may be an open issue to clarify these details further [2].

  2. For your second point about the ability to pass a different default team name, while there's current functionality that initializes the team with the same name as the organization, the flexibility of renaming or recalibrating this through parameters like options.teams.defaultTeam.name does seem to be a feature request that hasn't yet been implemented.

To follow up properly, I would recommend tagging @bekacru or @ping__, the Better Auth team members, who can provide you with the most current and accurate updates on this feature and how to proceed.

Is there another related topic or question I could help you explore?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Jan 16, 2026): It seems you're requesting documentation about the `teams.defaultTeam.enabled` feature, along with the addition of a flag like `options.teams.defaultTeam.name` for specifying the team name during organization creation. 1. Regarding the documentation for `teams.defaultTeam.enabled`, it's been noted that there isn't specific documentation readily available in the provided links. This flag is part of a broader discussion around team features in Better Auth, and there may be an open issue to clarify these details further [[2]](https://github.com/better-auth/better-auth/pull/7385). 2. For your second point about the ability to pass a different default team name, while there's current functionality that initializes the team with the same name as the organization, the flexibility of renaming or recalibrating this through parameters like `options.teams.defaultTeam.name` does seem to be a feature request that hasn't yet been implemented. To follow up properly, I would recommend tagging @bekacru or @ping__, the Better Auth team members, who can provide you with the most current and accurate updates on this feature and how to proceed. Is there another related topic or question I could help you explore? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@MuzzaiyyanHussain commented on GitHub (Jan 26, 2026):

I can take this up from a documentation perspective.

Specifically:

  • Documenting teams.defaultTeam.enabled
  • Explaining the default behavior (default team name = organization name)
  • Clarifying current limitations around customizing the default team name

I’ll keep the PR documentation-only and leave the options.teams.defaultTeam.name proposal for a separate discussion if needed.

@MuzzaiyyanHussain commented on GitHub (Jan 26, 2026): I can take this up from a documentation perspective. Specifically: - Documenting `teams.defaultTeam.enabled` - Explaining the default behavior (default team name = organization name) - Clarifying current limitations around customizing the default team name I’ll keep the PR documentation-only and leave the `options.teams.defaultTeam.name` proposal for a separate discussion if needed.
Author
Owner

@dperetti commented on GitHub (Feb 12, 2026):

Yep, needs to be documented on the website: just lost half an hour because of this default team that is created by default!

@dperetti commented on GitHub (Feb 12, 2026): Yep, needs to be documented on the website: just lost half an hour because of this default team that is created by default!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2717