diff --git a/src/bootstrap/runtime-adapters.ts b/src/bootstrap/runtime-adapters.ts index 9a29bc8..4e1ade5 100644 --- a/src/bootstrap/runtime-adapters.ts +++ b/src/bootstrap/runtime-adapters.ts @@ -513,6 +513,18 @@ export async function createRuntimeAdapters( techLogCsrf, ); if (studioOutcome) return studioOutcome; + // An anonymous profile carries no credentials by definition — the + // registry refuses to install one that allows any credential header. It + // must therefore never consult the session: a signed-out visitor's state + // is `unauthenticated`, and falling through below refused every public + // read before it left the browser. The public site rendered its terminal + // error surface on every screen with no request in the network log. + // + // Keyed on the profile's transport rather than a profile id, so any + // anonymous operation is covered rather than one named surface. + if (INSTALLED_REST_AUTH_PROFILES.get(operation.authProfileId)?.transport === "ANONYMOUS") { + return Object.freeze({ kind: "READY" as const, headers: Object.freeze({}) }); + } const state = authSession.getState(); if (state === "integration-failed") { return Object.freeze({ kind: "UNAVAILABLE" as const });