Recipes
Hono — B2B SaaS (multi-tenant)
← All recipes · First time? Set up your app (60 seconds — keys + redirect URI)
A Hono backend where each customer is a tenant, users may belong to multiple tenants, and roles are scoped per tenant. Builds on the single-tenant Hono recipe — read that first; this page only shows the deltas.
1. What you'll build#
A B2B SaaS Hono API where the user signs in, picks a tenant (Authaz Sign-In handles the picker UI), and every endpoint reads tenant_id from the access token to scope its work.
2. Application setup#
Create the application as multi-tenant, shared pool:
POST https://your-app.authaz.io/api/v1/applications
X-API-Key: mgmt_01h...
{
"name": "my-saas",
"tenancy_type"