organization-best-practices

Configure Better Auth organization plugin for multi-tenant access control.

2|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/involvex/happy-vibecode --skill organization-best-practices-involvex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: organization-best-practices
Source: https://github.com/involvex/happy-vibecode/tree/main/.agents/skills/organization-best-practices
Command: npx skills add https://github.com/involvex/happy-vibecode --skill organization-best-practices-involvex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a clear, repeatable approach to adding multi-tenant organization management to an application, removing ambiguity around organization creation, member invitation flows, role assignment, team management, and access control enforcement.

Core Features & Use Cases

  • Plugin Setup & Migrations: Instructions to enable the organization plugin on the server and client and run database migrations.
  • Organization Lifecycle: Create organizations, set active organizations, and manage ownership protections and deletion safeguards.
  • Members, Invitations & Roles: Invite members, send or generate invitation URLs, assign multiple roles, enforce membership limits, and implement RBAC with dynamic access control and custom roles.
  • Teams & Scoping: Enable teams, manage team membership, set active teams, and enforce team limits for scoped collaboration.
  • Extensibility & Safety: Configure lifecycle hooks, customize schemas and field names, send invitation emails via hooks, and apply security best practices like owner protection and invitation expiration.
  • Use Case: Add the organization plugin to a SaaS backend so admins can create workspaces, invite users, assign roles and teams, and enforce per-organization access controls.

Quick Start

Enable the organization plugin on server and client, run the Better Auth migrations, then create an organization and invite members through the client.

Frequently Asked Questions about organization-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up multi-tenant organizations with Better Auth?

To set up multi-tenant organizations, enable the Better Auth organization plugin on both server and client, run database migrations, and configure active-organization scoping to manage organization creation and member onboarding.

How does Better Auth handle role-based access control for organizations?

Better Auth RBAC for organizations allows assigning multiple roles, implementing dynamic access control, enforcing membership limits, and defining custom roles to manage permissions across application backends.

Can I send custom invitation emails when onboarding organization members?

Yes, you can send custom invitation emails by configuring invitation email hooks, which generate invitation URLs and trigger lifecycle events during the member invitation process.

What's the best way to structure teams and enforce access scoping in a multi-tenant app?

The best way to enforce team scoping is enabling teams, managing team membership, setting active teams, and applying team limits to restrict collaboration within the multi-tenant organization.

Does the Better Auth organization plugin support custom database schemas?

Yes, the plugin supports schema customization and custom field names, allowing you to adapt database migrations and schema structures to fit your application's specific requirements.

What security safeguards exist for organization ownership and invitations?

Security safeguards include owner protection mechanisms and invitation expiration rules, preventing unauthorized account changes and ensuring secure member onboarding within the organization.