Documentation Index
Fetch the complete documentation index at: https://docs.steward.fi/llms.txt
Use this file to discover all available pages before exploring further.
Cross-Tenant Identity
Steward supports multi-tenant authentication. A single user identity can belong to multiple apps (tenants), each with its own agents, policies, and configuration. The user keeps the same wallet and credentials across all apps.How It Works
When a user signs up through any auth method, Steward creates a user record tied to their email or wallet address. This user can then join additional tenants without creating new accounts.tenantId claim that scopes all API operations. Switching tenants refreshes the JWT with a new tenant context.
Join Modes
Each tenant controls how new users can join:| Mode | Description |
|---|---|
open | Anyone can join by calling joinTenant(id) |
invite | Users must be invited by a tenant admin |
closed | No new members allowed |
SDK Usage
List Tenants
Switch Tenant
Switching tenants refreshes the session JWT with a newtenantId claim:
Join a Tenant
Leave a Tenant
Users cannot leave their personal/default tenant. Attempting to leave the tenant they signed up with will throw an error.
React Usage
Tenant Picker
The<StewardTenantPicker> component renders a dropdown or list for switching between apps:
auth.switchTenant(). It auto-fetches tenant memberships when the user signs in.
User Button with Tenant Switcher
The<StewardUserButton> can include an inline tenant switcher:
Login with Tenant Context
Pass atenantId to <StewardLogin> to scope authentication to a specific app:
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/user/me/tenants | GET | List all tenants the current user belongs to |
/user/me/tenants/{tenantId}/join | POST | Join an open tenant |
/user/me/tenants/{tenantId}/leave | DELETE | Leave a tenant |
/auth/refresh | POST | Refresh with { refreshToken, tenantId } to switch tenant |
Data Isolation
Each tenant is a fully isolated environment:- Agents are scoped to a tenant. Agent IDs are unique within a tenant.
- Policies are set per-agent, per-tenant.
- Secrets and routes are tenant-scoped.
- Transaction history is per-tenant.
Related
- Auth Overview — Authentication flow and session management
- React Components —
<StewardTenantPicker>and<StewardUserButton> - Tenants API — REST API for tenant management