Skip to content

Organization Settings

Organization settings are presented as a modal dialog accessible from the account menu via “Manage organization”. The modal uses a split-pane layout — sidebar navigation on the left, scrollable content on the right — and supports six tabs covering all org-level configuration.

The modal is opened via the useOpenOrgModal() hook, which accepts an optional initialTab parameter to deep-link to a specific section:

const openOrgModal = useOpenOrgModal()
openOrgModal("billing") // Jump directly to billing tab

The “Manage organization” button is available to all org members from the account dropdown in the app shell.

Permission: Owner or Admin

Edit the organization’s display name. The slug is set at creation and cannot be changed.

authClient.organization.update({
organizationId,
data: { name: "New Name" },
})

Permission: Owner/Admin can manage, Members can view

Organization members table with roles and security status

ColumnDescription
NameMember display name
EmailMember email
RoleDropdown: Admin, Member (Owner role is not editable)
2FAGreen/gray icon indicating TOTP status
PasskeyGreen/gray icon indicating passkey status
JoinedMembership creation date
ActionsRemove button (disabled for owners)

Role changes are immediate:

authClient.organization.updateMemberRole({ memberId, role: "admin" })

Constraints: The owner role cannot be assigned or removed from this UI — only Admin and Member are selectable. Only owners and admins can modify roles.

Shows outstanding invitations with email, assigned role, and expiration date. Each can be cancelled:

authClient.organization.cancelInvitation({ invitationId })

Dialog to invite by email with a role assignment (Member or Admin):

authClient.organization.inviteMember({ email, role: "member" })

Permission: Owner/Admin can create and revoke, all members can view

Columns: Name, Key (masked prefix), Scopes (badges), Expiration, Last Used.

FieldOptions
NameRequired text
Scope presetRead-only, Read & Write, Full Access, Custom
Custom scopesGranular checkboxes per scope
Expiration7, 30, 90, 365, 1095 days, or Never
Allowed IPsOptional, comma-separated
Allowed User-AgentsOptional, comma-separated

After creation, the full key is shown once in a copy dialog — it cannot be retrieved again.

import { api } from "@red/backend/api"
// Create
const key = await createApiKey({
name: "CI/CD",
scopes: ["read:data", "write:data"],
expiresInDays: 90,
})
// Revoke
await revokeApiKey({ keyId: key.id })

Scopes are defined in @red/backend/apikey-scopes with presets and labels.

Permission: All members can view

Paginated org-scoped audit log (25 items/page) with filters:

FilterOptions
Event nameText search
StatusAll, Success, Failure, Denied

Columns: Date, Event, Status (badge), Actor. Includes CSV export.

import { api } from "@red/backend/api"
import { useQuery } from "convex/react"
const logs = useQuery(api.modules.core.audit.audit_api.listOrgAuditLogs, {
paginationOpts: { numItems: 25, cursor: null },
})

Permission: All can view, Owner can toggle MFA

When enabled, all org members are required to have two-factor authentication (TOTP or passkey). Enabling this:

  1. Requires the toggling user to already have MFA configured
  2. Immediately revokes sessions of members who lack MFA
  3. Returns the count of revoked sessions
import { api } from "@red/backend/api"
const result = await toggleMfa({ enforce: true })
// result.revokedSessions: number

The enforcement flag is stored in org.metadata.require2FA.

Permission: Owner only

Available in the danger zone. Deletion is blocked if any non-owner members remain — ownership must be transferred or members removed first.

authClient.organization.delete({ organizationId })

After deletion, BetterAuth clears the active org and the OrgGuard redirects to the org selection screen.

Permission: All members can view, Owner manages subscriptions

Billing tab showing subscription status, usage bars, and plan comparison

Displays plan name, subscription status (Active, Trial, Cancelling, Past due), and renewal or cancellation date.

ActionDescription
Manage BillingOpens Autumn billing portal for payment methods and invoices
Undo CancellationReverses a pending cancellation

Feature usage progress bars showing consumed vs. granted amounts. High usage (≥90%) is highlighted in red. Unlimited features show a badge instead of a bar.

Cards showing available plans with feature comparisons. The current plan is marked and disabled. Upgrade/downgrade buttons initiate checkout via Autumn.

One-time purchase cards for credit packs and extra features, using the same checkout flow.

CapabilityOwnerAdminMember
Edit org nameyesyesno
Invite membersyesyesno
Change member rolesyesyesno
Remove membersyesyesno
Create/revoke API keysyesyesno
View audit logsyesyesyes
Toggle MFA enforcementyesnono
Delete organizationyesnono
Manage billingyesnono
View billing & usageyesyesyes
FilePurpose
packages/web-shell/src/components/settings/org-admin-modal.tsxModal shell and tab routing
packages/web-shell/src/components/settings/tabs/org-profile-tab.tsxName editing
packages/web-shell/src/components/settings/tabs/org-members-tab.tsxMember and invitation management
packages/web-shell/src/components/settings/tabs/org-apikeys-tab.tsxAPI key lifecycle
packages/web-shell/src/components/settings/tabs/org-audit-tab.tsxOrg-scoped audit logs
packages/web-shell/src/components/settings/tabs/org-security-tab.tsxMFA enforcement and org deletion
packages/web-shell/src/components/settings/tabs/org-billing-tab.tsxSubscription, usage, and plan management
packages/backend/src/convex/modules/core/org/org_api.tsMFA toggle and member security queries
packages/backend/src/convex/modules/core/apiKeys/apikey_api.tsAPI key CRUD
packages/backend/src/convex/modules/core/audit/audit_api.tsOrg audit log queries