Tenants
A tenant is a separate sign-in service on its own hostname, served by the same Claxx Auth deployment. auth.dependabledispatch.com and auth.claxx.gg can be two tenants: each has its own applications, sign-in providers, themes and admins, and each is its own OIDC issuer. Someone using one never sees the other's name.
This is not the same thing as a downstream app's own customers or workspaces. Claxx Auth still knows nothing about those; see the hosted login URL contract.
What a tenant owns, and what is shared
| Per tenant | Shared across tenants | |
|---|---|---|
| Hostname and OIDC issuer | Yes | |
| Applications (OAuth clients) | Yes | |
| Sign-in providers and their OAuth credentials | Yes | |
| Themes | Yes | |
| Admins | Yes | Platform admins manage every tenant |
| Sessions | Yes: a session is only valid on the hostname it was created on | |
| Passkeys | Yes: a passkey belongs to the hostname it was registered on | |
| User accounts | Yes: one account per email, on every tenant | |
| Passwords and two-factor | Yes: they belong to the account | |
| Token signing keys | Yes | |
| Service settings (password policy) | Yes |
Because accounts are shared, a person who uses two tenants signs in to both with the same email and password, and signing up on a second tenant with an email that already has an account asks them to sign in instead. What they are signed in to is always one tenant at a time: signing in on one hostname does not sign them in on another.
Application slugs and provider slugs are unique across all tenants. If a slug is taken, choose another; the message does not say who holds it.
Platform admins and tenant admins
- A platform admin (
role = adminon the user, or the configured admin email) can administer every tenant, user accounts, signing keys and service settings, and can create tenants. - A tenant admin can administer one tenant's applications, themes, invitations, webhooks and its own settings, and choose which of the tenant's sign-in providers each application offers. They can see the tenant's providers but not add, change or remove them. They sign in on that tenant's hostname and open
/adminthere. They cannot see user accounts, signing keys, service settings or any other tenant.
An application created with the admin scope gets a service token with the rights of its own tenant's admin, and only on that tenant's hostname.
Admins need a second factor
The admin pages and the admin API open only to a session that proved two factors: a password and then an authenticator code (or a backup code), or a passkey. A sign-in with a password alone, an emailed sign-in link or an identity provider is one factor.
- An admin with no second factor who opens
/adminsees one screen, Add a second factor to continue, with Add an authenticator app and Add a passkey. Either asks for their password. When it is done the admin pages open, without signing in again. - An admin who has one but did not use it this time (they signed in with an emailed link, for example) sees Confirm it is you: a code from the authenticator app, a backup code, or a passkey, or Sign in again. Wrong codes count towards the same lock as the second step of sign-in.
- If they signed in with an emailed link or an identity provider and their password was set after that, the screen says to sign in again with the password and the second factor: a factor added with a password the session chose itself does not count.
The rule is a security-policy setting, Admins need a second factor, on by default. The platform admin can switch it off under Settings → Security policy; a tenant can switch it on for its own admins under This tenant → Security policy when the platform has it off, and cannot switch it off while the platform has it on. A tenant admin's rule is the one of the tenant whose hostname they signed in on. Service tokens are not affected. If the only platform admin loses their phone and their backup codes, an operator restores access (the admin-second-factor runbook kept with the code).
Create a tenant
Platform admins only. On the platform's own hostname:
- Admin → All tenants → Add tenant. Enter the name people will see, a slug, and the hostname (for example
auth.dependabledispatch.com). A pasted URL or a port is reduced to the hostname. - Route the hostname to the deployment. The domain's DNS zone must be in the same Cloudflare account as the Worker. Add the hostname to
routesinwrangler.jsoncand deploy:"routes": [ { "pattern": "auth.claxx.gg", "custom_domain": true, "zone_name": "claxx.gg" }, { "pattern": "auth.dependabledispatch.com", "custom_domain": true, "zone_name": "dependabledispatch.com" } ]
Until the route is live the tenant exists but its hostname does not answer. See the deployment runbook (docs/runbooks/deployment.mdin the repository). - Set the tenant up. Choose the tenant in the Tenant switcher at the top of the admin sidebar. Everything in the admin now shows that tenant's data. Then:
- Themes: create its theme.
- Providers: add its sign-in providers (below).
- Clients: register its applications and download each integration guide.
- This tenant: set the default application and default theme, the footer links, and add its first admin.
From then on the tenant's own admins can do step 3 themselves, on their own hostname, except Providers: those stay with the platform admin.
Sign-in providers belong to the tenant
Each tenant has its own OAuth application with Google, Microsoft or any OIDC provider, and the platform admin enters that application's client ID and secret under Providers, with the tenant selected in the switcher. This is what makes the provider's consent screen show the tenant's name rather than the platform's.
Only the platform admin, signed in on the platform's own hostname, adds, changes or removes a provider. Accounts are shared by every tenant and a provider decides whose account a sign-in opens, so whoever controls a provider could reach accounts outside the tenant. Service tokens cannot change providers either.
When registering the application with the provider, the redirect URI is on the tenant's hostname:
https://auth.dependabledispatch.com/oauth2/callback
A provider can only be used on its own tenant's hostname, linked to its own tenant's applications, and brokered to its own tenant's applications.
This tenant
Admin → This tenant holds the settings of the tenant in scope.
| Setting | Who | Effect |
|---|---|---|
| Name | Tenant admin | The name of the sign-in service: page title, header, passkey and authenticator-app labels |
| Hostname | Platform admin | The tenant's address and OIDC issuer. Changing it means every application must be reconfigured, and sessions and passkeys on the old hostname stop working |
| Slug, Active | Platform admin | An inactive tenant's hostname answers Not Found |
| Default application | Tenant admin | Used when the sign-in page is opened on this hostname without client_slug |
| Default theme | Tenant admin | Used for pages with no application and for applications with no theme of their own |
| Help, Privacy, Terms links | Tenant admin | Footer links on this hostname. An empty one is not shown |
| Admins | Tenant admin | Add, by email, an account that has signed in on this tenant before, or remove one. An admin cannot remove themselves |
| Security policy | Tenant admin | This tenant's own lock counts, lock times, sign-in and reset-link lifetimes, and "Admins need a second factor". Each can only be stricter than the platform's |
The platform's own documentation, privacy and terms pages are not served on a tenant's hostname.
What a tenant's users see
- Every page, email and cookie on the tenant's hostname carries the tenant's name and theme.
- The OIDC issuer in tokens is the tenant's hostname.
- The footer text is a theme field. A new theme starts with "Powered by Claxx Auth"; change it in the Theme Studio if the tenant should not show it.
Not yet covered
- Hostnames are routed in
wrangler.jsonc, so adding one needs a deploy. Self-service hostnames (Cloudflare for SaaS) are not wired. - Email sending is not configured for any tenant; see email triggers.
- Two short-lived continuation cookies keep a
claxxauth_name on every hostname.