@tokenoftrust/storefront-runner 2.0.20 → 2.0.21
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.
package/apps/storefront/env.d.ts
CHANGED
|
@@ -197,11 +197,13 @@ declare global {
|
|
|
197
197
|
/**
|
|
198
198
|
* Signed-in viewer for a login-gated preview host (set by the demo login
|
|
199
199
|
* gate once a valid, resource-bound `tot_session` cookie is present). Carries
|
|
200
|
-
* the email +
|
|
200
|
+
* the opaque subject, email + role(s)/capability tot20 resolved on this tenant, so chrome
|
|
201
201
|
* can show "signed in as … — owner/developer/staff". Absent on open or
|
|
202
202
|
* password-gated hosts.
|
|
203
203
|
*/
|
|
204
204
|
viewer?: {
|
|
205
|
+
/** Opaque identity-provider subject from the verified session assertion. */
|
|
206
|
+
subject?: string;
|
|
205
207
|
email: string;
|
|
206
208
|
roles: string[];
|
|
207
209
|
capability: string;
|
|
@@ -206,6 +206,7 @@ export async function serveControlPlane(input: ControlPlaneInput): Promise<Respo
|
|
|
206
206
|
: tenant.appDomain;
|
|
207
207
|
const hostCapability = sessionHostCapability(viewerRecord, capabilityHost, nowSeconds);
|
|
208
208
|
locals.viewer = {
|
|
209
|
+
...(viewerRecord.subject ? { subject: viewerRecord.subject } : {}),
|
|
209
210
|
email: viewerRecord.email,
|
|
210
211
|
roles: hostCapability ? [hostCapability] : viewerRecord.roles,
|
|
211
212
|
capability: hostCapability ?? viewerRecord.capability,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.21",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|