Repository navigation
Conversation
qweered
left a comment
There was a problem hiding this comment.
I think its better to just cp .env.example .env as suggested by upstream
8c93f1d to
225bd7b
Compare
1176a3d to
1e083d0
Compare
|
trying to solve url handling for SSO (google, github) |
1e083d0 to
a054894
Compare
I've created 2 upstream PRs which should help with this:
You would then set EDIT: oh, and you also have to wrap |
…deps Fixes Linux OAuth callbacks (Google/GitHub SSO) by setting T3CODE_DESKTOP_EXECUTABLE to the stable distro launcher $out/bin/t3code-desktop so the generated t3code-url-handler.desktop Exec is durable instead of a shared electron binary or transient AppImage mount. Prepares for upstream pingdotgg/t3code#8668 which reads T3CODE_DESKTOP_EXECUTABLE and allows unpackaged prod builds to register when the variable is set, and pingdotgg/t3code#8673 which requires update-desktop-database + xdg-mime on PATH. Wrap t3code-desktop (unwrapped) and the final symlinkJoin package with desktop-file-utils (update-desktop-database) and xdg-utils (xdg-mime) for Linux, as suggested in NixOS#555921 (comment).
56a237c to
620e2bc
Compare
…deps Fixes Linux OAuth callbacks (Google/GitHub SSO) by setting T3CODE_DESKTOP_EXECUTABLE to the stable distro launcher $out/bin/t3code-desktop so the generated t3code-url-handler.desktop Exec is durable instead of a shared electron binary or transient AppImage mount. Prepares for upstream pingdotgg/t3code#8668 which reads T3CODE_DESKTOP_EXECUTABLE and allows unpackaged prod builds to register when the variable is set, and pingdotgg/t3code#8673 which requires update-desktop-database + xdg-mime on PATH. Wrap t3code-desktop (unwrapped) and the final symlinkJoin package with desktop-file-utils (update-desktop-database) and xdg-utils (xdg-mime) for Linux, as suggested in NixOS#555921 (comment).
620e2bc to
ac66ed8
Compare
…deps Fixes Linux OAuth callbacks (Google/GitHub SSO) by setting T3CODE_DESKTOP_EXECUTABLE to the stable distro launcher $out/bin/t3code-desktop so the generated t3code-url-handler.desktop Exec is durable instead of a shared electron binary or transient AppImage mount. Prepares for upstream pingdotgg/t3code#8668 which reads T3CODE_DESKTOP_EXECUTABLE and allows unpackaged prod builds to register when the variable is set, and pingdotgg/t3code#8673 which requires update-desktop-database + xdg-mime on PATH. Wrap t3code-desktop (unwrapped) and the final symlinkJoin package with desktop-file-utils (update-desktop-database) and xdg-utils (xdg-mime) for Linux, as suggested in NixOS#555921 (comment).
|
Rebased onto current master (resolved the SPDX license-block interleave in Heads-up: an auto-update to t3code 0.1.0 is pending as #575132 (merge-bot eligible). It only touches the version/hash lines in |
ac66ed8 to
74c7f31
Compare
…deps Fixes Linux OAuth callbacks (Google/GitHub SSO) by setting T3CODE_DESKTOP_EXECUTABLE to the stable distro launcher $out/bin/t3code-desktop so the generated t3code-url-handler.desktop Exec is durable instead of a shared electron binary or transient AppImage mount. Prepares for upstream pingdotgg/t3code#8668 which reads T3CODE_DESKTOP_EXECUTABLE and allows unpackaged prod builds to register when the variable is set, and pingdotgg/t3code#8673 which requires update-desktop-database + xdg-mime on PATH. Wrap t3code-desktop (unwrapped) and the final symlinkJoin package with desktop-file-utils (update-desktop-database) and xdg-utils (xdg-mime) for Linux, as suggested in NixOS#555921 (comment).
|
Both PRs were merged into upstream as of 0.1.3. Github SSO for T3 Connect should with this PR, although I'm still not sure if you need to remove the |
a02adcb to
519ad1b
Compare
|
Besides the CI issues around formatting from what I see, approved. |
|
We use the same approach in OSSystems/t3code-nix: copy upstream’s I reviewed the current diff against our packaging. The build-time configuration and launcher override match what we carry. This PR also supplies the desktop URL-handler MIME type and runtime tools. Merging it would let us drop the corresponding local overrides when we update our nixpkgs input. Our package separately sets This is a source/packaging review; I have not built this PR head or independently tested its SSO flow. Assisted by Codex (gpt-6.1-sol). |
Retain the public production identifiers and desktop URL registration on the current 0.1.6 nixpkgs package. Assisted-by: ChatGPT (GPT-6)
f31574d to
c988bec
Compare
The bundled T3 Connect cloud UI (sign-in, relay discovery, environment picker) renders nothing in the packaged client because its configuration is compiled empty. The web client gates every cloud feature on build-time constants (
import.meta.env.VITE_CLERK_PUBLISHABLE_KEY,VITE_CLERK_JWT_TEMPLATE,VITE_T3CODE_RELAY_URL), which the monorepo env loader projects from the canonicalT3CODE_*names found in repo-root.env. Runtime environment variables cannot fix this for a packaged browser bundle — the gating happens at build time.This PR sets the four public identifiers (Clerk publishable key, JWT template name, CLI OAuth client ID, relay URL) as build-time
envso the derivation matches official upstream release builds. These values are published upstream in.env.example, which describes them as "the same public identifiers baked into official release builds, not secrets"; see alsodocs/internals/t3-connect.md.cc @iamanaws @qweered
Note for reviewers: #555814 touches the same file; this is a 12-line additive change and trivially rebasable if that merges first.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Addendum to "Tested basic functionality": built
t3code.unwrappedwith this change and verified the resulting store output contains the identifiers where they matter:apps/server/dist/client/assets/index-*.jscontains the publishable key,t3-relay, andrelay.t3.codes(client gating now passes)apps/server/dist/bin.mjscontains the publishable key and OAuth client IDOne known limitation: sign-in from non-
app.t3.codesorigins goes through Clerk components; if the production Clerk instance restricts allowed origins, that flow could still fail. Upstream ships the same bundle in its desktop releases, so parity with official builds remains the correct target.The Linux wrapper also advertises
x-scheme-handler/t3codeon the packaged desktop entry and points upstream's launcher override (T3CODE_DESKTOP_LAUNCHER_PATH, pingdotgg/t3code#8668) at the wrapper, so a handler-launched instance keeps the runtimePATH. The app still skips its ownxdg-mime defaultregistration whileapp.isPackagedis false, so making T3 Code the default handler for the scheme is left to user configuration (xdg.mimeApps.defaultApplications).