Skip to content
Organisations

Teams, roles and org switching, without building an admin panel

Users create organisations, invite colleagues and switch between them from inside your app. Each token speaks for one organisation and carries its role, so your API checks permissions offline, with a type for every one. Enterprise SSO and SCIM come per organisation.

Who it's for

For products that sell to teams

B2B startups

Let a customer bring their team on day one: an organisation, invites and roles, with no members table of your own.

Selling to enterprises

Each organisation gets its own SAML or OIDC sign-in, verified email domains and members provisioned by their directory.

Developers

Permissions are strings you define once. A misspelt one fails to compile, and one guard checks them in your API.

What it does

Everything a team needs, in the token

Organisations in your app

Users create organisations, change roles and leave, through the SDK. Admins manage every organisation in the dashboard.

Invites

Email invites are single use and tied to the address; links can be shared. Both expire, and both open a page of your app.

Custom roles

Owner, admin and member are built in. Add your own roles with the permissions they grant; members carry them in the token.

Org switching

One call switches the active organisation for this session only. The next token speaks for the new organisation, and the others are listed for your switcher.

Enterprise SSO and SCIM per organisation

A SAML or OIDC connection per organisation, verified email domains, and members added and removed by their directory.

Checked offline, typed

The organisation and its role are in the token. Your API verifies it with cached keys and one guard; the browser asks the same question with auth.can().

One token

Every check reads the same token

When a user signs in, their token carries who they are, their organisation and role, their plan and payment status, and what your flags target. Your API checks it in one guard, offline, and your UI reads the same answers.

Identitywho signed in, and howsub · amr
Rolesthe organisation and what it allowsorg.role
Billingthe plan and its payment statusbilling.plan
Flagswhat is switched on for this userflag()
In your code

Create, invite and switch in the browser, check in your API

The browser client creates the organisation and invites a colleague with the user's own token. After the switch, the next token carries the organisation and the role, and your API's guard reads them offline.

orgs.ts
// In the browser: the user creates an organisation, invites a colleague and switches to it
const org = await auth.orgs.create({ name: 'Acme' }); // the user is its owner
await auth.orgs.invite(org.id, { email: 'bob@acme.example', role: 'admin' }); // mailed; or a link
await auth.switchOrg(org.id); // the next tokens speak for Acme: user.org, user.orgRole
if (auth.can('members:manage')) showMembersPage(); // the same roles as the API's

// access.ts: roles once, shared by your API and the browser; a misspelt permission fails to compile
export const access = defineAccess({
  roles: { member: ['report:read'], admin: ['report:*', 'members:manage'], owner: ['*'] },
});

// api/server.ts: the org and its role are in the token; one guard checks them offline
app.post('/api/members', api.require('members:manage'), addMember);
app.get('/api/orgs/:org/settings', api.guard({ org: (c) => c.req.param('org'), orgRole: ['owner', 'admin'] }), settings);
The plan

Which plans include it

Prices in euros, excluding VAT. Test environments include every feature on every plan.

Free €0

Included

Startup €29 a month

Included

Team €99 a month

Included

Scale €299 a month

Included

Enterprise from €2,000 a month

Included

Sovereign from €20,000 a year

Included

Questions

Before you start

Can users create organisations themselves?

Yes, when you turn it on in the project's settings. Otherwise admins create them in the dashboard. Either way, the user who creates an organisation is its owner.

How do custom roles reach my code?

A custom role names the permissions it grants, the same strings as your defineAccess roles. A member holding it carries them in the token, so your guards grant them without a new entry.

Can one user belong to several organisations?

Yes. Each token speaks for one, the active organisation, and lists the others so you can show a switcher. Switching changes this session only; the user's other sessions keep theirs.

Does single sign-on work per organisation?

Yes. Each organisation can have its own SAML or OIDC connection and verified domains, and SCIM keeps its members in step with the directory. Members a directory provisions stay the directory's.

Give your customers their team today

Turn on self-service organisations in the test environment, create one from your app and watch the role arrive in the token.

Products

Auth

Hosted sign-in, organisations, roles and enterprise SSO.

Billing

Plans, checkout, invoices and EU VAT, with the plan in the token.

Feature flags

Targeting and rollouts, evaluated offline from the token.

Support chat

Talk to your users beside their plan, roles and flags.

Support access

Act as a user with a reason, a time limit and an audit trail.

Lead gen

Chat with visitors, and keep them when they sign up.