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
[Bug]: T3 Connect desktop OAuth callback fails — Clerk rejects response_type / 'Invalid T3 Connect authorization callback' (Windows, v0.0.30-v0.0.32-nightly) #5051
Open the URL in a browser and sign in with an existing T3 account.
Expected behavior
Browser completes the Clerk OAuth flow and redirects to http://127.0.0.1:34338/callback?code=...&state=..., which the waiting CLI picks up to finish pairing.
Actual behavior
Two different failure modes observed across attempts, both from the same root cause:
Mode A — Clerk redirects immediately with an OAuth error, before any sign-in UI:
Note response_type=codeis present in the outbound authorize URL, and state comes back empty in the error redirect even though the outbound URL had a real value — indicating Clerk rejects the request before honoring the query params it was given.
Mode B — after actually completing sign-in in the browser: Invalid T3 Connect authorization callback.
In both modes, the CLI eventually exits with:
CloudCliAuthorizationError: Could not authorize the T3 Connect CLI.
[cause]: CloudCliAuthorizationTimeoutError: Timed out waiting for T3 Connect authorization.
[cause]: TimeoutError
Impact
Major — npx t3 connect cannot complete pairing at all on this machine/account, across three consecutive released versions.
Version or commit
v0.0.30
v0.0.31
v0.0.32-nightly.20260730.959
Environment
Windows 11, Node v24.12.0, run from Git Bash / PowerShell, both with and without a browser auto-opened by the CLI (tried Enter to open browser).
Notes
Likely related to the cluster of other very recent Clerk/T3-Connect auth bugs filed around the same time: #4815, #4840, #4915, #4934. This report is the desktop-browser OAuth authorize/callback path specifically (not the headless-SSH state/PKEC fragment flow in #4934, and not the non-loopback-bind "relay offline" case in #4915) — filing separately since none of those match this exact symptom.
Workaround
None found. Fell back to t3 serve --tailscale-serve (headless server + Tailscale Serve HTTPS proxy + manual pairing token/URL) to get cross-machine access working instead.
Reopening — retested and this is still broken, on a build cut after this issue was closed.
Retested npx t3@nightly connect just now (nightly resolved to 0.0.32-nightly.20260731.961, which post-dates the close at 2026-07-30T22:25:04Z). Same exact failure:
Fresh authorize URL generated with a valid response_type=code, state, and code_challenge.
Browser flow ends with: Invalid T3 Connect authorization callback.
CLI times out the same way as before (CloudCliAuthorizationError → CloudCliAuthorizationTimeoutError → TimeoutError).
The only related fix I can find in the commit log around the close time is fbecb73 (bump Clerk Electron SDK to 0.0.24, register t3code:// scheme on Linux) — but that's the Electron deep-link path for the desktop app, not this CLI's http://127.0.0.1:34338/callback OAuth flow, so it doesn't look like it should have touched this code path. Happy to grab more diagnostics (HAR of the browser flow, --log-level trace CLI output, etc.) if that helps narrow it down.
Retested on current stable t3 v0.0.33 (Windows). Summary: still broken in the desktop flow, but the headless flow authorizes fine — which isolates this to the loopback callback path rather than the CLI's OAuth/PKCE generation.
Desktop flow — still fails.npx t3@latest connect login emits the same authorize URL shape as in the original report:
Same outcome as before: Invalid T3 Connect authorization callback, then the CLI times out.
Headless flow — works.npx t3@latest connect login --headless on the same version, same machine, same account succeeds. It uses a different endpoint entirely:
Sign-in completes, the pasted code is accepted, and the CLI reports a successful sign-in. connect status then shows "authenticated": true, and connect link authorizes the environment normally.
Why this narrows it down: both flows are driven by the same CLI build and generate state/code_challenge the same way, and the headless one round-trips successfully. So the fault is not in the parameters the CLI produces — it is specific to the clerk.t3.codes/oauth/authorize → 127.0.0.1:34338/callback leg. That also explains why the Electron/Linux deep-link fix referenced around the original close did not affect this.
Workaround for anyone hitting this on Windows: use --headless and paste the code back. It must be run in a real interactive terminal — piping stdin makes the code prompt hit EOF and exit immediately.
Worth reopening, since the closure predates this and the reported path is still failing on the latest stable.
Activity
russlib commentedon Jul 31, 2026
Reopening — retested and this is still broken, on a build cut after this issue was closed.
Retested
npx t3@nightly connectjust now (nightly resolved to0.0.32-nightly.20260731.961, which post-dates the close at 2026-07-30T22:25:04Z). Same exact failure:response_type=code,state, andcode_challenge.Invalid T3 Connect authorization callback.CloudCliAuthorizationError→CloudCliAuthorizationTimeoutError→TimeoutError).The only related fix I can find in the commit log around the close time is
fbecb73(bump Clerk Electron SDK to 0.0.24, registert3code://scheme on Linux) — but that's the Electron deep-link path for the desktop app, not this CLI'shttp://127.0.0.1:34338/callbackOAuth flow, so it doesn't look like it should have touched this code path. Happy to grab more diagnostics (HAR of the browser flow,--log-level traceCLI output, etc.) if that helps narrow it down.russlib commentedon Aug 11, 2026
Retested on current stable
t3 v0.0.33(Windows). Summary: still broken in the desktop flow, but the headless flow authorizes fine — which isolates this to the loopback callback path rather than the CLI's OAuth/PKCE generation.Desktop flow — still fails.
npx t3@latest connect loginemits the same authorize URL shape as in the original report:Same outcome as before:
Invalid T3 Connect authorization callback, then the CLI times out.Headless flow — works.
npx t3@latest connect login --headlesson the same version, same machine, same account succeeds. It uses a different endpoint entirely:Sign-in completes, the pasted code is accepted, and the CLI reports a successful sign-in.
connect statusthen shows"authenticated": true, andconnect linkauthorizes the environment normally.Why this narrows it down: both flows are driven by the same CLI build and generate
state/code_challengethe same way, and the headless one round-trips successfully. So the fault is not in the parameters the CLI produces — it is specific to theclerk.t3.codes/oauth/authorize→127.0.0.1:34338/callbackleg. That also explains why the Electron/Linux deep-link fix referenced around the original close did not affect this.Workaround for anyone hitting this on Windows: use
--headlessand paste the code back. It must be run in a real interactive terminal — piping stdin makes the code prompt hit EOF and exit immediately.Worth reopening, since the closure predates this and the reported path is still failing on the latest stable.
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
feat(scripts): guard fork prose against live upstream citations
8 remaining items