Prompt Buddy logoPrompt Buddy

better-auth ยท Better Auth Docs

Plugins Organization | Better Auth

Teaches how to implement and configure the organization plugin in Better Auth, including server-side configuration, database migration, and client-side plugin setup for managing members and teams.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Plugins Organization | Better Auth

Teaches how to implement and configure the organization plugin in Better Auth, including server-side configuration, database migration, and client-side plugin setup for managing members and teams.

When To Use

Use when you need to implement multi-tenant organization management, role-based access control, or team membership features within a Better Auth application.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/plugins-organization-better-auth-workflow-guide.mdA guide detailing how to install, configure, and migrate the database for the better-auth organization plugin.Questions about a guide detailing how to install, configure, and migrate the database for the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-setup.textA code example demonstrating how to initialize the organization plugin within the better-auth configuration.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the organization plugin within the better-auth configuration.
examples/plugins-organization-better-auth-better-auth-organization-plugin-migrati.textA text snippet demonstrating the npx auth migrate command used for organization plugin database migrations in better-auth.Exact payloads, commands, or snippets shown in A text snippet demonstrating the npx auth migrate command used for organization plugin database migrations in better-...
examples/plugins-organization-better-auth-better-auth-plugins-organization-cli-ge.textThe CLI command used to generate organization plugin configurations for better-auth.Exact payloads, commands, or snippets shown in The CLI command used to generate organization plugin configurations for better-auth.
examples/plugins-organization-better-auth-better-auth-organization-plugin-client-.textA code example demonstrating how to initialize the better-auth client with the organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the better-auth client with the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-create-client.textA TypeScript code snippet demonstrating how to use the authClient to create a new organization with metadata and configuration options.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to create a new organization with metadata and conf...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create-.textA code example demonstrating how to use the better-auth organization plugin to create a new organization via the API.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the better-auth organization plugin to create a new organization via the API.
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu.textA code example demonstrating how to configure the organization plugin with a custom allowUserToCreateOrganization callback in better-auth.Exact payloads, commands, or snippets shown in A code example demonstrating how to configure the organization plugin with a custom allowUserToCreateOrganization cal...
examples/plugins-organization-better-auth-better-auth-organization-checkslug-clie.textA code snippet demonstrating how to use the authClient.organization.checkSlug method to verify an organization slug.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient.organization.checkSlug method to verify an organization slug.
examples/plugins-organization-better-auth-better-auth-organization-plugin-check-o.textA code example demonstrating how to use the checkOrganizationSlug API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the checkOrganizationSlug API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-hooks.textA TypeScript code example demonstrating how to implement organization creation hooks using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to implement organization creation hooks using the better-auth organizati...
examples/plugins-organization-better-auth-better-auth-organization-plugin-hooks-2.textA TypeScript code example demonstrating how to implement custom organization hooks like beforeAddMember within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to implement custom organization hooks like beforeAddMember within the be...
examples/plugins-organization-better-auth-better-auth-organization-plugin-hooks-3.textA TypeScript code example demonstrating how to implement custom logic using organization hooks like beforeCreateInvitation in better-auth.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to implement custom logic using organization hooks like beforeCreateInvit...
examples/plugins-organization-better-auth-better-auth-organization-plugin-hooks-4.textA TypeScript code example demonstrating how to use organization plugin hooks like beforeCreateTeam and afterCreateTeam within a better-auth configuration.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use organization plugin hooks like beforeCreateTeam and afterCreateTea...
examples/plugins-organization-better-auth-better-auth-organization-plugin-hooks-5.textA TypeScript code example demonstrating how to use organization hooks like beforeAddMember within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use organization hooks like beforeAddMember within the better-auth org...
examples/plugins-organization-better-auth-better-auth-organization-plugin-react-u.textA React code example demonstrating how to use the useListOrganizations hook from the better-auth organization plugin to render a list of organizations.Exact payloads, commands, or snippets shown in A React code example demonstrating how to use the useListOrganizations hook from the better-auth organization plugin...
examples/plugins-organization-better-auth-better-auth-organization-plugin-svelte-.textA Svelte component demonstrating how to use the better-auth organization plugin to list organizations using the authClient hook.Exact payloads, commands, or snippets shown in A Svelte component demonstrating how to use the better-auth organization plugin to list organizations using the authC...
examples/plugins-organization-better-auth-better-auth-organization-plugin-react-c.textA React component demonstrating how to use the useListOrganizations hook from the better-auth organization plugin to display a list of organizations.Exact payloads, commands, or snippets shown in A React component demonstrating how to use the useListOrganizations hook from the better-auth organization plugin to...
examples/plugins-organization-better-auth-better-auth-organization-list-client.textA code snippet demonstrating how to use the authClient to list organizations using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to list organizations using the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-or.textA code snippet demonstrating how to use the listOrganizations API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the listOrganizations API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-set-active-cli.textA TypeScript code snippet demonstrating how to use the authClient to set an active organization using an ID and slug.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to set an active organization using an ID and slug.
examples/plugins-organization-better-auth-better-auth-organization-plugin-set-act.textA code example demonstrating how to use the setActiveOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the setActiveOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-databas.textA TypeScript code example demonstrating how to use database hooks within the better-auth organization plugin to set an initial active organization ID during session creation.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use database hooks within the better-auth organization plugin to set a...
examples/plugins-organization-better-auth-better-auth-organization-plugin-react-u-2.textA React code example demonstrating how to use the useActiveOrganization hook from the better-auth organization plugin to display the active organization name.Exact payloads, commands, or snippets shown in A React code example demonstrating how to use the useActiveOrganization hook from the better-auth organization plugin...
examples/plugins-organization-better-auth-better-auth-organization-plugin-svelte--2.textA Svelte component demonstrating how to use the useActiveOrganization hook from the better-auth organization plugin to display the current organization name.Exact payloads, commands, or snippets shown in A Svelte component demonstrating how to use the useActiveOrganization hook from the better-auth organization plugin t...
examples/plugins-organization-better-auth-better-auth-organization-plugin-react-u-3.textA React code example demonstrating how to use the useActiveOrganization hook from the better-auth organization plugin to access active organization data.Exact payloads, commands, or snippets shown in A React code example demonstrating how to use the useActiveOrganization hook from the better-auth organization plugin...
examples/plugins-organization-better-auth-better-auth-organization-getfullorganiz.textA TypeScript code snippet demonstrating how to use the authClient to retrieve full organization details using organizationId and organizationSlug.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to retrieve full organization details using organiz...
examples/plugins-organization-better-auth-better-auth-organization-plugin-get-ful.textA code snippet demonstrating how to call the getFullOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the getFullOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-client.textA TypeScript code snippet demonstrating how to use the authClient to update organization details such as name, slug, and metadata.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to update organization details such as name, slug,...
examples/plugins-organization-better-auth-better-auth-organization-update-api.textA code example demonstrating how to use the updateOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-delete.textA code snippet demonstrating how to use the organization plugin to delete an organization using the authClient.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the organization plugin to delete an organization using the authClient.
examples/plugins-organization-better-auth-better-auth-organization-plugin-delete-.textA code example demonstrating how to call the deleteOrganization API endpoint using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to call the deleteOrganization API endpoint using the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-2.textA code example demonstrating how to configure the organization plugin with custom hooks for before and after organization deletion.Exact payloads, commands, or snippets shown in A code example demonstrating how to configure the organization plugin with custom hooks for before and after organiza...
examples/plugins-organization-better-auth-better-auth-organization-plugin-setup-2.textA TypeScript code example demonstrating how to configure the organization plugin with a custom sendInvitationEmail function in better-auth.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to configure the organization plugin with a custom sendInvitationEmail fu...
examples/plugins-organization-better-auth-better-auth-organization-invite-member-.textA code example demonstrating how to use the authClient to invite a new member to an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to invite a new member to an organization using the better-aut...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create--2.textA code example demonstrating how to use the createInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the createInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-accept-invitat.textA code snippet demonstrating how to use the authClient to accept an organization invitation using an invitation ID.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to accept an organization invitation using an invitation ID.
examples/plugins-organization-better-auth-better-auth-organization-plugin-accept-.textA code example demonstrating how to use the better-auth organization plugin to accept an invitation via the acceptInvitation API endpoint.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the better-auth organization plugin to accept an invitation via the acceptInv...
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-3.textA TypeScript code example demonstrating how to initialize the organization plugin with custom email invitation logic in better-auth.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to initialize the organization plugin with custom email invitation logic...
examples/plugins-organization-better-auth-better-auth-organization-cancel-invitat.textA code snippet demonstrating how to use the cancelInvitation method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the cancelInvitation method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-cancel-.textA code example demonstrating how to use the cancelInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the cancelInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-reject-invitat.textA code snippet demonstrating how to use the authClient to reject an organization invitation using an invitation ID.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to reject an organization invitation using an invitation ID.
examples/plugins-organization-better-auth-better-auth-organization-plugin-reject-.textA code example demonstrating how to use the rejectInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the rejectInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-get-invitation.textA TypeScript code snippet demonstrating how to use the authClient to retrieve an organization invitation by its ID.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to retrieve an organization invitation by its ID.
examples/plugins-organization-better-auth-better-auth-organization-plugin-get-inv.textA code example demonstrating how to use the better-auth organization plugin to retrieve an invitation via the getInvitation API method.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the better-auth organization plugin to retrieve an invitation via the getInvi...
examples/plugins-organization-better-auth-better-auth-organization-list-invitatio.textA TypeScript code snippet demonstrating how to use the authClient to list organization invitations using the organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to list organization invitations using the organiza...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-in.textA code example demonstrating how to use the listInvitations API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listInvitations API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--2.textA TypeScript code example demonstrating how to use the organization plugin client methods to list user invitations.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use the organization plugin client methods to list user invitations.
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-us.textA code example demonstrating how to use the listUserInvitations API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listUserInvitations API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-members-c.textA TypeScript code snippet demonstrating how to use the authClient to list organization members with query parameters like organizationId, limit, and sorting.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to list organization members with query parameters...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-me.textA code example demonstrating how to use the better-auth organization plugin to list members with query parameters and headers.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the better-auth organization plugin to list members with query parameters and...
examples/plugins-organization-better-auth-better-auth-organization-remove-member-.textA TypeScript code snippet demonstrating how to use the authClient to remove a member from an organization using their email or ID.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to remove a member from an organization using their...
examples/plugins-organization-better-auth-better-auth-organization-plugin-remove-.textA code snippet demonstrating how to use the better-auth organization plugin to remove a member from an organization via the API.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the better-auth organization plugin to remove a member from an organization v...
examples/plugins-organization-better-auth-better-auth-organization-update-member-.textA code snippet demonstrating how to use the updateMemberRole method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the updateMemberRole method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-update-.textA code example demonstrating how to use the updateMemberRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateMemberRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-get-active-mem.textA TypeScript code snippet demonstrating how to use the authClient to retrieve the currently active organization member.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to retrieve the currently active organization member.
examples/plugins-organization-better-auth-better-auth-organization-plugin-get-act.textA code snippet demonstrating how to use the getActiveMember API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the getActiveMember API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-active-.textA TypeScript code snippet demonstrating how to use the better-auth client to retrieve the active member's role within an organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the better-auth client to retrieve the active member's role within...
examples/plugins-organization-better-auth-better-auth-organization-plugin-get-act-2.textA code snippet demonstrating how to use the getActiveMemberRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the getActiveMemberRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-add-member-cli.textA TypeScript code snippet demonstrating how to use the authClient to add a new member to an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to add a new member to an organization using the be...
examples/plugins-organization-better-auth-better-auth-organization-plugin-add-mem.textA code example demonstrating how to use the addMember API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the addMember API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-leave-client.textA code snippet demonstrating how to use the authClient to leave an organization using the organizationId.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to leave an organization using the organizationId.
examples/plugins-organization-better-auth-better-auth-organization-plugin-leave-o.textA code example demonstrating how to call the leaveOrganization API method using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to call the leaveOrganization API method using the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-access-.textA TypeScript code example demonstrating how to use createAccessControl to define permissions for the organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use createAccessControl to define permissions for the organization plu...
examples/plugins-organization-better-auth-better-auth-organization-plugin-access--2.textA TypeScript code example demonstrating how to use createAccessControl to define custom roles and permissions within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use createAccessControl to define custom roles and permissions within...
examples/plugins-organization-better-auth-better-auth-organization-plugin-access--3.textA TypeScript code example demonstrating how to use createAccessControl to define roles and permissions within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use createAccessControl to define roles and permissions within the bet...
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-4.textA code snippet demonstrating how to initialize the better-auth client with the organization plugin and custom role definitions.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to initialize the better-auth client with the organization plugin and custom role de...
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--3.textA code example demonstrating how to initialize the better-auth client with the organization plugin and custom role configurations.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the better-auth client with the organization plugin and custom role co...
examples/plugins-organization-better-auth-better-auth-organization-plugin-permiss.textAn example demonstrating how to use the organization plugin to check resource permissions using the auth.api.hasPermission method.Exact payloads, commands, or snippets shown in An example demonstrating how to use the organization plugin to check resource permissions using the auth.api.hasPermi...
examples/plugins-organization-better-auth-better-auth-organization-plugin-permiss-2.textA code example demonstrating how to use the organization plugin to check for specific resource permissions using the authClient.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the organization plugin to check for specific resource permissions using the...
examples/plugins-organization-better-auth-better-auth-organization-plugin-role-pe.textA TypeScript code example demonstrating how to use the better-auth organization plugin to check role-based permissions using the authClient.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use the better-auth organization plugin to check role-based permission...
examples/plugins-organization-better-auth-better-auth-organization-plugin-setup-3.textA code example demonstrating how to initialize the organization plugin with dynamic access control enabled in a better-auth configuration.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the organization plugin with dynamic access control enabled in a bette...
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--4.textA code example demonstrating how to initialize the better-auth client with the organization plugin and dynamic access control enabled.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the better-auth client with the organization plugin and dynamic access...
examples/plugins-organization-better-auth-better-auth-organization-plugin-role-pe-2.textA code example demonstrating how to define custom permissions and create roles within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to define custom permissions and create roles within the better-auth organization pl...
examples/plugins-organization-better-auth-better-auth-organization-plugin-custom-.textA code example demonstrating how to define custom resources and permissions within the organization plugin configuration in better-auth.Exact payloads, commands, or snippets shown in A code example demonstrating how to define custom resources and permissions within the organization plugin configurat...
examples/plugins-organization-better-auth-better-auth-organization-delete-role-cl.textA code snippet demonstrating how to use the authClient to delete a specific role within an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to delete a specific role within an organization using the bet...
examples/plugins-organization-better-auth-better-auth-organization-plugin-delete--2.textA code snippet demonstrating how to call the deleteOrgRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the deleteOrgRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-roles-cli.textA TypeScript code snippet demonstrating how to use the authClient to list roles within a specific organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to list roles within a specific organization using...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-or-2.textA code example demonstrating how to use the listOrgRoles API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listOrgRoles API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-get-role-clien.textA TypeScript code snippet demonstrating how to use the authClient to retrieve a specific role within an organization using the organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to retrieve a specific role within an organization...
examples/plugins-organization-better-auth-better-auth-organization-plugin-get-org.textA code example demonstrating how to use the getOrgRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the getOrgRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-role-cl.textA TypeScript code snippet demonstrating how to use the authClient to update a role within an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to update a role within an organization using the b...
examples/plugins-organization-better-auth-better-auth-organization-plugin-update--2.textA code example demonstrating how to use the updateOrgRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateOrgRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-5.textA configuration example for the better-auth organization plugin demonstrating dynamic access control settings.Exact payloads, commands, or snippets shown in A configuration example for the better-auth organization plugin demonstrating dynamic access control settings.
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-6.textA configuration example for the better-auth organization plugin demonstrating dynamic access control settings.Exact payloads, commands, or snippets shown in A configuration example for the better-auth organization plugin demonstrating dynamic access control settings.
examples/plugins-organization-better-auth-better-auth-organization-plugin-dynamic.textA code example demonstrating how to implement dynamic access control within the better-auth organization plugin to limit roles based on a user's plan.Exact payloads, commands, or snippets shown in A code example demonstrating how to implement dynamic access control within the better-auth organization plugin to li...
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-7.textA configuration example demonstrating how to extend the organization plugin schema with additional fields like role colors.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to extend the organization plugin schema with additional fields like role c...
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--5.textA TypeScript code snippet demonstrating how to initialize the organization plugin within the better-auth client configuration.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to initialize the organization plugin within the better-auth client confi...
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--6.textA TypeScript code snippet demonstrating how to initialize the better-auth client with the organization plugin and custom schema fields.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to initialize the better-auth client with the organization plugin and cus...
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-8.textA TypeScript code snippet demonstrating how to initialize the organization plugin with team limits and removal restrictions in better-auth.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to initialize the organization plugin with team limits and removal restri...
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--7.textA code example demonstrating how to initialize the organization plugin within the better-auth client configuration.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the organization plugin within the better-auth client configuration.
examples/plugins-organization-better-auth-better-auth-organization-create-team-cl.textA TypeScript code snippet demonstrating how to use the authClient to create a new team within an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to create a new team within an organization using t...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create--3.textA code snippet demonstrating how to use the better-auth organization plugin API to create a new team.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the better-auth organization plugin API to create a new team.
examples/plugins-organization-better-auth-better-auth-organization-list-teams-cli.textA TypeScript code snippet demonstrating how to use the authClient to list teams within a specific organization using the organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to list teams within a specific organization using...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-te.textA code example demonstrating how to use the listOrganizationTeams API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listOrganizationTeams API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-team-cl.textA TypeScript code snippet demonstrating how to use the authClient to update a team within the organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to update a team within the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-update--3.textA code example demonstrating how to use the updateTeam API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateTeam API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-remove-team-cl.textA code snippet demonstrating how to use the authClient to remove a team from an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to remove a team from an organization using the better-auth or...
examples/plugins-organization-better-auth-better-auth-organization-plugin-remove--2.textA code snippet demonstrating how to use the better-auth organization plugin API to remove a team by providing a teamId and organizationId.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the better-auth organization plugin API to remove a team by providing a teamI...
examples/plugins-organization-better-auth-better-auth-organization-set-active-tea.textA code snippet demonstrating how to use the authClient to set an active team within the organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to set an active team within the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-set-act-2.textA code example demonstrating how to use the organization plugin to set an active team via the auth API.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the organization plugin to set an active team via the auth API.
examples/plugins-organization-better-auth-better-auth-organization-list-user-team.textA code snippet demonstrating how to use the authClient to list user teams within the organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to list user teams within the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-us-2.textA code example demonstrating how to use the listUserTeams API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listUserTeams API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-team-memb.textA code example demonstrating how to use the authClient to list team members within a specific organization team.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to list team members within a specific organization team.
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-te-2.textA code example demonstrating how to use the listTeamMembers API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listTeamMembers API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-add-team-membe.textA code snippet demonstrating how to use the authClient to add a new member to an organization team.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to add a new member to an organization team.
examples/plugins-organization-better-auth-better-auth-organization-plugin-add-tea.textA code snippet demonstrating how to use the addTeamMember API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the addTeamMember API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-remove-team-me.textA code snippet demonstrating how to use the authClient to remove a member from a team within the organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to remove a member from a team within the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-remove--3.textA code snippet demonstrating how to call the removeTeamMember API endpoint using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the removeTeamMember API endpoint using the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-9.textA text configuration example demonstrating how to set fixed or dynamic limits for teams and members within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A text configuration example demonstrating how to set fixed or dynamic limits for teams and members within the better...
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-10.textA configuration example demonstrating how to enable and configure the organization plugin settings in better-auth.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to enable and configure the organization plugin settings in better-auth.
examples/plugins-organization-better-auth-better-auth-organization-invite-member.textA code example demonstrating how to use the inviteMember method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the inviteMember method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-configu-11.textA code snippet demonstrating how to configure the organization plugin schema and map custom fields within the better-auth initialization.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to configure the organization plugin schema and map custom fields within the better-...
examples/plugins-organization-better-auth-better-auth-organization-plugin-customi.textA code example demonstrating how to extend the organization plugin schema with additional custom fields in better-auth.Exact payloads, commands, or snippets shown in A code example demonstrating how to extend the organization plugin schema with additional custom fields in better-auth.
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--8.textA code example demonstrating how to initialize the better-auth client with the organization plugin and custom schema fields.Exact payloads, commands, or snippets shown in A code example demonstrating how to initialize the better-auth client with the organization plugin and custom schema...
examples/plugins-organization-better-auth-better-auth-organization-plugin-client--9.textA code snippet demonstrating how to configure the organization plugin with additional schema fields using the better-auth client.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to configure the organization plugin with additional schema fields using the better-...
examples/plugins-organization-better-auth-better-auth-organization-plugin-extensi.textA TypeScript code example demonstrating how to extend the organization plugin schema to allow custom fields while enforcing type safety.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to extend the organization plugin schema to allow custom fields while enf...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create--4.textA code example demonstrating how to create an organization with custom metadata using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to create an organization with custom metadata using the better-auth organization pl...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create--5.textA code example demonstrating how to use the createOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the createOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-check-slug-cli.textA code example demonstrating how to use the authClient to check an organization's slug using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to check an organization's slug using the better-auth organiza...
examples/plugins-organization-better-auth-better-auth-organization-plugin-check-o-2.textA code example demonstrating how to use the checkOrganizationSlug API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the checkOrganizationSlug API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-or-3.textA code example demonstrating how to use the listOrganizations API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listOrganizations API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-set-active-cli-2.textA code snippet demonstrating how to use the authClient to set an active organization using an ID and slug.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to set an active organization using an ID and slug.
examples/plugins-organization-better-auth-better-auth-organization-plugin-set-act-3.textA code example demonstrating how to use the setActiveOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the setActiveOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-getfullorganiz-2.textA code example demonstrating how to use the getFullOrganization method from the better-auth organization plugin to retrieve organization details.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the getFullOrganization method from the better-auth organization plugin to re...
examples/plugins-organization-better-auth-better-auth-organization-getfullorganiz-3.textA code example demonstrating how to use the getFullOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the getFullOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-client-2.textA code snippet demonstrating how to use the authClient to update organization details such as name, slug, and metadata.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to update organization details such as name, slug, and metadata.
examples/plugins-organization-better-auth-better-auth-organization-update-api-req.textA text representation of a code snippet demonstrating how to call the updateOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A text representation of a code snippet demonstrating how to call the updateOrganization API method within the better...
examples/plugins-organization-better-auth-better-auth-organization-plugin-delete--3.textA code snippet demonstrating how to use the better-auth organization plugin to delete an organization by its ID.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the better-auth organization plugin to delete an organization by its ID.
examples/plugins-organization-better-auth-better-auth-organization-plugin-delete--4.textA code snippet demonstrating how to call the deleteOrganization API method using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the deleteOrganization API method using the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-invite-member--2.textA TypeScript code snippet demonstrating how to use the authClient to invite a new member to an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to invite a new member to an organization using the...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create--6.textA code example demonstrating how to use the createInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the createInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-accept-invitat-2.textA code example demonstrating how to use the authClient to accept an organization invitation using an invitation ID.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to accept an organization invitation using an invitation ID.
examples/plugins-organization-better-auth-better-auth-organization-accept-invitat-3.textA code snippet demonstrating how to call the acceptInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the acceptInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-cancel-invitat-2.textA code example demonstrating how to use the cancelInvitation method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the cancelInvitation method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-cancel--2.textA code example demonstrating how to use the cancelInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the cancelInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-reject-invitat-2.textA code example demonstrating how to use the rejectInvitation method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the rejectInvitation method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-reject--2.textA code snippet demonstrating how to call the rejectInvitation API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the rejectInvitation API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-get-invitation-2.textA code example demonstrating how to use the authClient to retrieve an organization invitation by its ID.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to retrieve an organization invitation by its ID.
examples/plugins-organization-better-auth-better-auth-organization-get-invitation-3.textA code example demonstrating how to use the better-auth organization plugin to retrieve an invitation via the getInvitation API method.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the better-auth organization plugin to retrieve an invitation via the getInvi...
examples/plugins-organization-better-auth-better-auth-organization-list-invitatio-2.textA code example demonstrating how to use the authClient to list organization invitations using the organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to list organization invitations using the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-invitatio-3.textA code snippet demonstrating how to use the listInvitations API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the listInvitations API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-members-c-2.textA code example demonstrating how to use the authClient to list organization members with query parameters like organizationId, limit, and sorting.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to list organization members with query parameters like organi...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-me-2.textA code snippet demonstrating how to use the listMembers API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the listMembers API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-remove-member--2.textA code snippet demonstrating how to use the authClient to remove a member from an organization using their ID or email.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to remove a member from an organization using their ID or email.
examples/plugins-organization-better-auth-better-auth-organization-plugin-remove--4.textA code snippet demonstrating how to call the removeMember API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to call the removeMember API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-member--2.textA code example demonstrating how to use the updateMemberRole method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateMemberRole method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-update--4.textAn example of calling the updateMemberRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in An example of calling the updateMemberRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-api-usa.textA code example demonstrating how to use the getActiveMember API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the getActiveMember API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-api-usa-2.textA code example demonstrating how to use the getActiveMemberRole API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the getActiveMemberRole API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-add-member-cli-2.textA TypeScript code snippet demonstrating how to use the authClient to add a new member to an organization with specific roles and IDs.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to add a new member to an organization with specifi...
examples/plugins-organization-better-auth-better-auth-organization-plugin-add-mem-2.textA code example demonstrating how to use the addMember API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the addMember API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-leave-client-2.textA code snippet demonstrating how to use the authClient to leave an organization using the organization leave method.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to leave an organization using the organization leave method.
examples/plugins-organization-better-auth-better-auth-organization-plugin-leave-o-2.textA code example demonstrating how to call the leaveOrganization API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to call the leaveOrganization API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-role-pe-3.textA code example demonstrating how to define custom permissions and create a new role within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to define custom permissions and create a new role within the better-auth organizati...
examples/plugins-organization-better-auth-better-auth-organization-plugin-custom--2.textA code example demonstrating how to define and assign custom resources and permissions within the better-auth organization plugin configuration.Exact payloads, commands, or snippets shown in A code example demonstrating how to define and assign custom resources and permissions within the better-auth organiz...
examples/plugins-organization-better-auth-better-auth-organization-delete-role.textA code snippet demonstrating how to use the authClient to delete a specific role within an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to delete a specific role within an organization using the bet...
examples/plugins-organization-better-auth-better-auth-organization-plugin-delete--5.textA code example demonstrating how to use the deleteOrgRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the deleteOrgRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-roles-cli-2.textA TypeScript code snippet demonstrating how to use the authClient to list roles within a specific organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to list roles within a specific organization using...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-or-4.textA code example demonstrating how to use the listOrgRoles API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listOrgRoles API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-get-role-clien-2.textA TypeScript code snippet demonstrating how to use the authClient to retrieve a specific role within an organization using the organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to retrieve a specific role within an organization...
examples/plugins-organization-better-auth-better-auth-organization-get-org-role-a.textA code example demonstrating how to use the getOrgRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the getOrgRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-role-cl-2.textA TypeScript code snippet demonstrating how to use the authClient to update a role within an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to update a role within an organization using the b...
examples/plugins-organization-better-auth-better-auth-organization-update-org-rol.textA code example demonstrating how to use the updateOrgRole API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateOrgRole API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-create-team-cl-2.textA TypeScript code snippet demonstrating how to use the authClient to create a new team within an organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A TypeScript code snippet demonstrating how to use the authClient to create a new team within an organization using t...
examples/plugins-organization-better-auth-better-auth-organization-plugin-create--7.textA code example demonstrating how to use the createTeam API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the createTeam API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-teams-cli-2.textA code example demonstrating how to use the authClient to list teams within a specific organization using the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to list teams within a specific organization using the better-...
examples/plugins-organization-better-auth-better-auth-organization-list-teams-api.textA code example demonstrating how to use the listOrganizationTeams API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listOrganizationTeams API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-update-team.textA code snippet demonstrating how to use the authClient to update a team's details within the organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to update a team's details within the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-update--5.textA code example demonstrating how to use the updateTeam API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the updateTeam API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-remove-team-cl-2.textA code snippet demonstrating how to use the authClient to remove a team from an organization in better-auth.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the authClient to remove a team from an organization in better-auth.
examples/plugins-organization-better-auth-better-auth-organization-plugin-remove--5.textA code snippet demonstrating how to use the removeTeam API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code snippet demonstrating how to use the removeTeam API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-set-active-tea-2.textA code example demonstrating how to use the authClient to set an active team within the organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to set an active team within the organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-set-act-4.textA code example demonstrating how to use the setActiveTeam API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the setActiveTeam API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-us-3.textA code example demonstrating how to use the listUserTeams API endpoint within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listUserTeams API endpoint within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-list-team-memb-2.textA code example demonstrating how to use the authClient to list team members within a specific organization using the organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to list team members within a specific organization using the...
examples/plugins-organization-better-auth-better-auth-organization-plugin-list-te-3.textA code example demonstrating how to use the listTeamMembers API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the listTeamMembers API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-add-team-membe-2.textA code example demonstrating how to use the authClient to add a new member to an organization team.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to add a new member to an organization team.
examples/plugins-organization-better-auth-better-auth-organization-plugin-add-tea-2.textA code example demonstrating how to use the addTeamMember API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the addTeamMember API method within the better-auth organization plugin.
examples/plugins-organization-better-auth-better-auth-organization-remove-team-me-2.textA code example demonstrating how to use the authClient to remove a member from a specific team within the organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the authClient to remove a member from a specific team within the organizatio...
examples/plugins-organization-better-auth-better-auth-organization-plugin-remove--6.textA code example demonstrating how to use the removeTeamMember API method within the better-auth organization plugin.Exact payloads, commands, or snippets shown in A code example demonstrating how to use the removeTeamMember API method within the better-auth organization plugin.

What This Skill Covers

  • The organization plugin allows you to manage your organization's members and teams.
  • Main sections: Installation, Add the plugin to your auth config, Migrate the database, Add the client plugin, Usage.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

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