Skip to content

Managing Sectors

Your SpartanAuth account has a tenant root sector — the default sector you land in when you log in to the dashboard. From that root you create sub-sectors, one for each application you want to authenticate.

A sector is an isolated namespace: users, credentials, security settings, OAuth providers, allowed origins, and API keys all belong to one sector. End-user login (the login widget) always targets a single sector ID.

AspectTenant rootSub-sector
What it isThe default sector for your organizationAn additional sector you create for one app
Who administers itTenant root adminsAdmins of that sector, plus tenant root admins
Use it for an app?Possible, not recommendedRecommended — one sub-sector per app
Dashboard loginYour organization slug (for example /login/acme)Each sub-sector has its own slug if you want a dedicated login URL

Create a sub-sector for each application you host. The tenant root can authenticate an app, but sharing it across products mixes users, CORS origins, OAuth clients, and API keys. Sub-sectors keep each app’s users and settings separate while you still manage everything from the tenant root dashboard.

Tenant root admins can:

  • Create, edit, and delete sub-sectors (the tenant root itself cannot be deleted)
  • Invite users and manage profiles in any sector in the organization
  • Create API keys on the tenant root (those keys can administer every sector) or on a single sub-sector (scoped to that app)

Sub-sector admins can only manage that sub-sector.

  1. Log in to the dashboard with your tenant root account.
  2. Open Sectors.
  3. Under New sector, enter a name (e.g. “Production app”) and a slug (URL-safe login identifier, lowercase letters, numbers, and hyphens).
  4. Optionally set Domain and Allowed Origins (you can add these later).
  5. Submit. Copy the new Sector ID (UUID) — that is what the login widget’s sector attribute uses.

The slug is fixed after create. It is used in dashboard login URLs (https://dashboard.spartanauth.com/login/{slug}).

The sidebar sector dropdown switches context. Users, security settings, OAuth, and API keys always apply to the selected sector. Tenant root admins can switch into any sub-sector; sub-sector admins only see their own.

The Domain field sets the primary origin for the app that uses this sector. SpartanAuth uses this for:

  • CORS — only requests from allowed origins can call the API from a browser
  • Email links — password reset and magic link URLs

Allowed Origins adds extra CORS origins (e.g. https://staging.myapp.com, http://localhost:5173 for local development). Configure origins on the sub-sector that app uses, not only on the tenant root.

When Self Sign-Up is enabled on a sector, new users can register via <spartan-login>. When disabled, users must be invited. This is per sector — you can allow self sign-up on a public app and keep it off on an internal tool.

Per-sector options include:

  • Required MFA
  • Password policy
  • Session / access token lifetime
  • WebAuthn RP ID and origins (passkeys)

Configure these on the sub-sector your users actually log into.

Deleting a sub-sector is permanent and removes profiles, credentials, and settings in that sector. The tenant root sector cannot be deleted.

When you delete a sub-sector, also remove its users if you no longer need those accounts, and stop sending that Sector ID from your app.