plugins/organization library
Organizations: teams, members, roles, and invitations.
Requires the organization() plugin on your Better Auth server. Importing
this library adds an organization getter to BetterAuthClient.
After setActive, call BetterAuthFlutter.refreshSession() if you rely on
Session.activeOrganizationId — the cached session is otherwise stale until
the next fetch.
Classes
- BetterAuthOrganization
-
Typed wrapper for the most-used Better Auth
organization()routes. - CreateOrganizationBody
- Body for creating an organization.
- FullOrganization
- An organization with its members and pending invitations.
- Invitation
- An invitation to join an organization.
- InviteMemberBody
- Body for inviting a member.
- Member
- A member of an organization.
- Organization
- An organization.
Extensions
- CreateOrganizationBodyPatterns on CreateOrganizationBody
- Adds pattern-matching-related methods to CreateOrganizationBody.
- FullOrganizationPatterns on FullOrganization
- Adds pattern-matching-related methods to FullOrganization.
- InvitationPatterns on Invitation
- Adds pattern-matching-related methods to Invitation.
- InviteMemberBodyPatterns on InviteMemberBody
- Adds pattern-matching-related methods to InviteMemberBody.
- MemberPatterns on Member
- Adds pattern-matching-related methods to Member.
- OrganizationExtension on BetterAuthClient
- OrganizationPatterns on Organization
- Adds pattern-matching-related methods to Organization.