Repository navigation
feat(native): complete T3 Connect Clerk Native auth, DPoP relay connect, and Connect i18n (#93) - #472
Merged
Merged
Conversation
…ct, and Connect i18n (#93)
…rejected reconnect, 2FA Enter, test isolation)
This was referenced Nov 20, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #93
Completes
CN-RELAYpurely client-side insideapps/native/**with zero upstream T3 changes:Summary
GET /v1/environments404: UpdatedCloud::discover(apps/native/crates/client/src/connect.rs) from/v1/client/environmentsto the contract endpointGET /v1/environmentswith 401invalid_bearerretry on Clerk sessions._is_native=1) auth:ClerkClient(apps/native/crates/client/src/connect.rs) and pure parsers/models (apps/native/crates/core/src/connect.rs) supporting:oauth_google,oauth_github,oauth_apple,oauth_microsoft) targetingcom.t3tools.t3code://callbackvia native macOSASWebAuthenticationSession(apps/native/crates/app/src/auth_session_macos.rs,AuthenticationServices.framework+objc2/block2anchored to the activeNSWindowwith clean cancellation onASWebAuthenticationSessionErrorCodeCanceledLogin).email_codeorpassword) plusneeds_second_factor(totp/backup_code) directly inside the Connect card.0o600cloud-clerk.jsonsession persistence with rotatedAuthorizationheader tracking on every response,t3-relayJWT minting & caching (until 15s beforeexp), and best-effortDELETE /v1/client/sessions/{id}?_is_native=1+ clearing bothcloud-clerk.jsonandcloud-oauth.jsonon sign-out.cloud-oauth.jsoncompatibility showing"Sign in with T3 Connect to enable direct relay connections."only when a legacy OAuth token is present without a Clerk session./status, and/connectrelay connections:POST /v1/client/dpop-token(t3-web,environment:connect environment:status),POST /v1/environments/{id}/status, andPOST /v1/environments/{id}/connect(clientProofKeyThumbprint) with401 invalid_bearer1x retry and RFC 3339expiresAt-> epoch ms conversion.dpop::register_relay_credential(binding bothhttpBaseUrland normalizedwsBaseUrlorigins while preservingseed_tokenacross renewals) andstore.rsrelay-managed tracking (relay-managed.json+SavedEnvironments::upsert_relay) without alteringSavedEnvironment's struct fields.Preparehook that refreshes the relay credential (and handlesPrepareError::Movedendpoint relocation) before reconnecting.apps/native/crates/app/src/connect.rsthroughcrate::i18n::t/t_fmt.CN-RELAYinapps/native/parity/LEDGER.mdtodone.Verification
vp fmt --check apps/native/parity/LEDGER.md: PASSCARGO_INCREMENTAL=0 cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings: PASS (0 warnings)T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test --manifest-path apps/native/Cargo.toml -p t3-core --lib: 1,895 passed, 0 failedT3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test --manifest-path apps/native/Cargo.toml -p t3-client --lib: 175 passed, 0 failed (includes mock HTTP server tests forGET /v1/environments, Clerk Native OAuth + email/2FA + header rotation, DPoP exchange/proof verification/401 retry,/status,/connectcredential registration)T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test --manifest-path apps/native/Cargo.toml -p t3-native --features snapshot -- --test-threads=1 connect::tests: 6 passed, 0 failedBuilt with Antigravity.