create-authhero 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,19 +7,21 @@ import {
|
|
|
7
7
|
DataAdapters,
|
|
8
8
|
} from "@authhero/multi-tenancy";
|
|
9
9
|
|
|
10
|
-
//
|
|
11
|
-
const
|
|
10
|
+
// Control plane tenant ID - the tenant that manages all other tenants
|
|
11
|
+
const CONTROL_PLANE_TENANT_ID = "control_plane";
|
|
12
12
|
|
|
13
13
|
export default function createApp(
|
|
14
|
-
config: Omit<MultiTenantAuthHeroConfig, "
|
|
14
|
+
config: Omit<MultiTenantAuthHeroConfig, "controlPlaneTenantId"> & {
|
|
15
15
|
dataAdapter: DataAdapters;
|
|
16
16
|
},
|
|
17
17
|
) {
|
|
18
18
|
const { app } = init({
|
|
19
19
|
...config,
|
|
20
|
-
|
|
21
|
-
// Sync resource servers from
|
|
20
|
+
controlPlaneTenantId: CONTROL_PLANE_TENANT_ID,
|
|
21
|
+
// Sync resource servers from control plane tenant to all child tenants
|
|
22
22
|
syncResourceServers: true,
|
|
23
|
+
// Sync roles from control plane tenant to all child tenants
|
|
24
|
+
syncRoles: true,
|
|
23
25
|
});
|
|
24
26
|
|
|
25
27
|
app
|
|
@@ -36,7 +38,7 @@ export default function createApp(
|
|
|
36
38
|
version: "1.0.0",
|
|
37
39
|
status: "running",
|
|
38
40
|
docs: "/docs",
|
|
39
|
-
|
|
41
|
+
controlPlaneTenant: CONTROL_PLANE_TENANT_ID,
|
|
40
42
|
});
|
|
41
43
|
})
|
|
42
44
|
.get("/docs", swaggerUI({ url: "/api/v2/spec" }));
|