-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
P2Important — depends on P1Important — depends on P1phase:2-orgsPhase 2: Multi-tenancy & OrganizationsPhase 2: Multi-tenancy & Organizations
Description
Description
Add organization configuration to support both B2B (organizations visible) and B2C (organizations hidden) modes.
Details
Config section:
organizations: {
enabled: true, // false → B2C mode, organizations invisible to users
autoCreate: true, // auto-create a default organization on signup
domainMatching: true, // match users to existing organizations by email domain
}When enabled: false:
- Organization is auto-created at signup (invisible to user)
- No organization switcher, no organization pages in frontend
- User gets owner membership on their implicit organization
- All CASL abilities still work (scoped to implicit organization)
- Can switch to B2B later without refactoring
Config exposed via GET /api/auth/config response:
{
"sign": { "in": true, "up": true },
"organizations": { "enabled": true, "domainMatching": true }
}Acceptance criteria
- Config toggles organization visibility
- B2C mode: organization auto-created silently at signup
- B2B mode: organization creation/joining flow at signup
- Config exposed in auth/config endpoint
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important — depends on P1Important — depends on P1phase:2-orgsPhase 2: Multi-tenancy & OrganizationsPhase 2: Multi-tenancy & Organizations