You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
native: T3 Connect sign-in and relay environments, first slice (CN-RELAY) #93
First slice of ledger row CN-RELAY: sign in to T3 Connect without Clerk JS (the CLI's OAuth PKCE + loopback flow, apps/server/src/cli/auth.ts, apps/server/src/cloud/CliTokenManager.ts, packages/shared/src/connectAuth.ts), list the account's cloud environments, and connect to one through the managed relay. Web sources: apps/web/src/cloud/, apps/web/src/components/cloud/, packages/client-runtime/src/relay/. Trevor approved live sign-in with his account (he approves the browser step).
First CN-RELAY slice is ready for review. Live sign-in and an actual managed-relay environment connection remain pending Trevor's browser step; no real window has been launched.
The ledger remains partial. Remaining gaps: onboarding and host linking/unlinking; multiple routes/fallback per environment (adding relay currently replaces a direct/SSH route); seamless socket renewal and automatic recovery after failed relay preparation; web wakeup/polling and progressive discovery publication.
All 1,009 Rust workspace tests passed serially, as did Clippy, the snapshot build, theme/parity/conformance checks, and the read-only smoke probe. Local PNG evidence: /tmp/t3-93-baseline.png, /tmp/t3-93-after.png, /tmp/t3-93-cloud-final.png.
PR #97 now keeps OAuth sign-in and account listing but explicitly disables relay connections/health checks. Live Clerk sign-in/listing remain pending Trevor's manual browser step; no real window has been launched.
The review's authentication finding is confirmed: infra/relay/src/http/Api.ts:1069 verifies only a relay-audience Clerk JWT for the DPoP exchange. Bearer listing uses verifyRelayClientBearerToken, whose OAuth fallback is covered in infra/relay/src/http/Api.test.ts:416-439. No alternate OAuth-authorized relay-session endpoint exists; CLI t3 connect links/publishes the local server rather than connecting a remote client.
Required upstream change: make layerTokenApi.exchangeDpopAccessToken in infra/relay/src/http/Api.ts verify an OAuth subject token using its verified user identity, retaining resource/client/scope/DPoP/replay checks. Accept an appropriate OAuth access-token subject type in packages/contracts/src/relay.ts; add endpoint-level OAuth acceptance and rejection tests while retaining the JWT path. No relay/server files were edited here.
Cloud Add now refuses without mutating saved direct/local/SSH routes. The unsupported DPoP bootstrap/session path was removed, eliminating the stale discovery-endpoint pin. Refreshed listings accept changed endpoint metadata. Both original bugs were reproduced with failing tests before the fixes.
PR #97 cleanup at 5ae8e410de2777dc6b73335a13a8b3a3bcde3f32, rebased on the latest fork/native:
Deleted the saved relay-record kind and its startup, onboarding, and account-lifecycle consumers. Unknown/malformed saved records are skipped individually, preserving valid paired records. No relay migration was added.
Removed the unused health model/validation/presentation/tests, disabled button handler, and always-error upsert. Only OAuth sign-in, account listing, listing errors, and the disabled explanation remain.
The catalog regression failed before the fix. All 1,013 workspace tests and required checks pass; the offscreen listing capture is /tmp/t3-93-cleanup-listing.png.
The upstream OAuth-aware DPoP exchange requirement in infra/relay/src/http/Api.ts remains unchanged and documented in the PR. Live Clerk sign-in/listing remain pending coordination; no real window or browser has been launched.
First slice merged in #97 (CN-RELAY stays partial): OAuth PKCE loopback sign-in, owner-only token storage with refresh and sign-out, account environment listing, entry from Settings → Environments. Connecting through the relay is disabled with an explanation: the relay's DPoP token exchange (infra/relay/src/http/Api.ts) accepts only Clerk relay-audience JWTs, not the CLI OAuth token, so native needs an upstream OAuth-aware exchange first. The first design's DPoP/socket transport is preserved in the PR history (6615486). Other gaps: onboarding, host linking, route fallback, socket renewal. Live sign-in against real Clerk not yet run.
Activity
rynfar commentedon Nov 3, 2026
Review PR: #97
First CN-RELAY slice is ready for review. Live sign-in and an actual managed-relay environment connection remain pending Trevor's browser step; no real window has been launched.
The ledger remains
partial. Remaining gaps: onboarding and host linking/unlinking; multiple routes/fallback per environment (adding relay currently replaces a direct/SSH route); seamless socket renewal and automatic recovery after failed relay preparation; web wakeup/polling and progressive discovery publication.All 1,009 Rust workspace tests passed serially, as did Clippy, the snapshot build, theme/parity/conformance checks, and the read-only smoke probe. Local PNG evidence:
/tmp/t3-93-baseline.png,/tmp/t3-93-after.png,/tmp/t3-93-cloud-final.png.rynfar commentedon Nov 3, 2026
PR #97 now keeps OAuth sign-in and account listing but explicitly disables relay connections/health checks. Live Clerk sign-in/listing remain pending Trevor's manual browser step; no real window has been launched.
The review's authentication finding is confirmed:
infra/relay/src/http/Api.ts:1069verifies only a relay-audience Clerk JWT for the DPoP exchange. Bearer listing usesverifyRelayClientBearerToken, whose OAuth fallback is covered ininfra/relay/src/http/Api.test.ts:416-439. No alternate OAuth-authorized relay-session endpoint exists; CLIt3 connectlinks/publishes the local server rather than connecting a remote client.Required upstream change: make
layerTokenApi.exchangeDpopAccessTokenininfra/relay/src/http/Api.tsverify an OAuth subject token using its verified user identity, retaining resource/client/scope/DPoP/replay checks. Accept an appropriate OAuth access-token subject type inpackages/contracts/src/relay.ts; add endpoint-level OAuth acceptance and rejection tests while retaining the JWT path. No relay/server files were edited here.Cloud Add now refuses without mutating saved direct/local/SSH routes. The unsupported DPoP bootstrap/session path was removed, eliminating the stale discovery-endpoint pin. Refreshed listings accept changed endpoint metadata. Both original bugs were reproduced with failing tests before the fixes.
CN-RELAY stays
partial: upstream OAuth exchange support, onboarding/host linking, route fallback, socket renewal, and discovery wakeup/polling remain gaps.Local PNGs:
/tmp/t3-93-review-signed-out.png,/tmp/t3-93-review-listing.png(previous state:/tmp/t3-93-cloud-final.png).rynfar commentedon Nov 3, 2026
PR #97 cleanup at
5ae8e410de2777dc6b73335a13a8b3a3bcde3f32, rebased on the latestfork/native:/tmp/t3-93-cleanup-listing.png.The upstream OAuth-aware DPoP exchange requirement in
infra/relay/src/http/Api.tsremains unchanged and documented in the PR. Live Clerk sign-in/listing remain pending coordination; no real window or browser has been launched.rynfar commentedon Nov 3, 2026
First slice merged in #97 (CN-RELAY stays
partial): OAuth PKCE loopback sign-in, owner-only token storage with refresh and sign-out, account environment listing, entry from Settings → Environments. Connecting through the relay is disabled with an explanation: the relay's DPoP token exchange (infra/relay/src/http/Api.ts) accepts only Clerk relay-audience JWTs, not the CLI OAuth token, so native needs an upstream OAuth-aware exchange first. The first design's DPoP/socket transport is preserved in the PR history (6615486). Other gaps: onboarding, host linking, route fallback, socket renewal. Live sign-in against real Clerk not yet run.feat(native): complete T3 Connect Clerk Native auth, DPoP relay conne…
rynfar commentedon Nov 20, 2026
Completed
#93(CN-RELAY) purely client-side insideapps/native/**(PR #472, no upstream relay/contract changes): fixedGET /v1/environments, implemented Clerk Native Frontend API (_is_native=1) authentication via macOSASWebAuthenticationSessionsocial OAuth + inline email code/password & TOTP/backup 2FA,t3-relayJWT minting, full RFC 9449 DPoP exchange (/v1/client/dpop-token), environment/status&/connectcredential registration + supervisorPrepareauto-refresh/relocation, and updatedCN-RELAYtodoneinLEDGER.md.