Repository navigation
Logged-in-aware exposed state of cloud.datum.net that can only be read by datum.net #893
Description
High-Level Summary
Every goal in #890 (nav/CTA personalization, signup-prompt suppression, roadmap voting attribution, form prefill, etc.) needs one prerequisite: a way for datum.net to know whether the current browser is signed in to Datum Cloud (cloud.datum.net) — without exposing that signal to any other origin.
Today that signal doesn't exist. This issue is scoped to just building it — not to any of the personalized UI that consumes it (that stays tracked under #890 and its other sub-issues).
Current state (verified)
cloud-portal's session cookie (_session,AUTH_COOKIE_KEYS.SESSION) is set withdomain: new URL(env.public.appUrl).hostname(app/utils/auth/auth.service.ts) — i.e. scoped tocloud.datum.net's own hostname,httpOnly,sameSite: lax. It is not shared across.datum.net, so the browser never sends it on adatum.netrequest. This is the correct, secure default — not a bug to fix in cloud-portal.datum.net's repo already has a stub atsrc/pages/api/user.tsthat tries to read a_sessioncookie directly and calls the IAM API with it. Because of the point above, this cookie is never actually present on adatum.netrequest in production — the endpoint is effectively dead code today. It isn't wired intoNav.astroor anywhere else in the UI.
The ask
Design and implement a narrow, purpose-built way for datum.net to learn "is this visitor currently signed in to Datum Cloud" (and probably a minimal display payload — name/org — TBD by design), that:
- Only
datum.net(https://www.datum.net/https://datum.net) can read — not an arbitrary third-party origin - Leaks nothing beyond what's needed for personalization (no tokens, no scopes, no permissions)
- Fails closed: any error, timeout, or ambiguous state renders
datum.netas if the visitor is signed out
Candidate approaches to evaluate at design time (not prescribing one):
- A dedicated endpoint on
cloud.datum.net(orauth.datum.net) that responds to acredentials: 'include'cross-origin request fromdatum.net, with CORS locked to that exact origin, returning a minimal{ signedIn: boolean, displayName?, orgName? }shape - A short-lived, purpose-scoped signed token/postMessage handshake instead of a raw CORS+cookie read, if the team wants to avoid widening cookie/CORS trust between the two apps
This spans at least cloud-portal (and/or auth-ui) plus datum.net — flagging as cross-repo/backend-required.
Non-Goals
- Any personalized UI itself (nav CTA swap, signup suppression, roadmap voting, form prefill, etc.) — those are separate, downstream sub-issues of Create a more personalized website experience for users #890
- Changing where/how
cloud-portal's own session cookie is scoped — it should stay app-local; this issue is about a separate, narrowly-scoped signal fordatum.netto consume, not widening the existing session cookie's trust boundary
Relationship to #890
Sub-issue of #890 — blocks the "Navigation and primary CTA" and "Suppress signup prompts globally" goals listed there at minimum; several of the other goals (roadmap voting attribution, form prefill) will also need this signal or an extension of it.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
github-actions commentedon Sep 23, 2026
Issues must have exactly one assignee, but 2 were assigned (@yahyafakhroji, @gaghan430). All assignees have been removed. Please assign a single owner.
yahyafakhroji commentedon Sep 24, 2026
@felixwidjaja @AriaEdo
The portal side is live on staging (cloud-portal#1581, infra#5964). How it works: a datum.net page calls the portal with
credentials: 'include', the browser sends the portal cookie on its own, and the portal only answers our website origins.Routes:
GET /api/website/session-status: signed in or not, plus name, org, dashboard linkGET /api/website/profile: email and the HelpScout signaturePOST /api/website/feedback: title and body from a signed-in visitorGET /api/website/login?returnTo=<page>: sign-in link that returns the visitor to the pageKeep in mind: anything other than a 200 means signed out, don't store the email in the browser, and new origins (previews too) need adding to
WEBSITE_ORIGINSin infra first.felixwidjaja commentedon Sep 24, 2026
Thanks guys! It works.
jacobsmith928 commentedon Sep 24, 2026
@felixwidjaja please coordinate a brief changelog with @kaleygel thanks!
felixwidjaja commentedon Sep 25, 2026
@yahyafakhroji ; as we discussed. We'll need to expand this. Can you provide the marked (Y):
All projects || Create new project (Y)
Account settings
Logout (Y)
Thank you.
felixwidjaja commentedon Sep 25, 2026
datum-cloud/cloud-portal#1589
felixwidjaja commentedon Sep 28, 2026
Just in: