diff --git a/astro.config.mjs b/astro.config.mjs index 97410718..9d28439b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -78,8 +78,7 @@ export default defineConfig({ // KloudMate RUM. `init` runs from `onload` so the bundle is fully executed // before it is called; the rolling /v2/ path picks up SDK patches without an // edit here. Session recording is off, so this collects page performance and - // errors only. The `km-rum-ready` event lets UserNav.astro attach the - // signed-in user's userId/userEmail even though this bundle loads async. + // errors only. head: [ { tag: 'script', @@ -95,7 +94,7 @@ export default defineConfig({ version: '', sampleRate: 1.0, sessionRecorder: { enabled: false }, - }); document.dispatchEvent(new Event('km-rum-ready'))`, + })`, }, }, ], diff --git a/src/components/UserNav.astro b/src/components/UserNav.astro index 0818fd95..0622789e 100644 --- a/src/components/UserNav.astro +++ b/src/components/UserNav.astro @@ -1,113 +1,14 @@ --- /** - * Account button for the header: "Log in" by default, "Go to Dashboard" when a - * KloudMate session exists. + * Account button for the header: a link to the app's root. The app sends a + * returning user on to the region they last used, a signed-out user to + * sign-in, and a signed-in user to their dashboard. * - * The docs share the platform's HTTP-only session cookie (scoped to - * `.kloudmate.com`), so `GET https://api./users/me` with credentials - * resolves the signed-in user without any auth flow here. The API's CORS - * allowlist already reflects any `*.` origin with credentials. - * The same result is attached to RUM spans as `userId` / `userEmail`, which is - * what the RUM sessions UI reads (anonymous sessions otherwise). - * - * Off-domain (localhost, previews) there is no shared cookie, so the script - * skips the network call and keeps the static logged-out default. + * The docs don't call the API: it answers the web app's origin only. */ --- -Log in - - +Log in