Repository navigation
Support connecting to remote environments behind SSO dev tunnels on iOS and Desktop #24876
honzazarcky
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When self-hosting a T3 Code server behind an SSO-authenticated dev tunnel (like Microsoft Dev Tunnels, Cloudflare Access, or ngrok OAuth), connecting in a browser works fine because the browser handles the interactive SSO redirect and saves the session cookie.
In the iOS and Desktop apps, adding the same server via Add Environment fails. Background requests to /.well-known/t3/environment and /oauth/token hit the tunnel's 302 login redirect instead of getting JSON, and query parameters are stripped by normalizeHttpBaseUrl.
Could we support one of these two approaches in packages/client-runtime and the Add Environment UI?
Custom HTTP Headers per environment: Allow users to add optional key-value headers (like X-Tunnel-Authorization for Microsoft Dev Tunnels or CF-Access-Client-Id for Cloudflare) in PairingConnectionInput and BearerConnectionProfile so requests can bypass browser SSO without conflicting with T3's Authorization Bearer header.
In-app WebView login: If discovery hits an auth redirect, let the user sign in via an embedded WebView and share the tunnel's session cookies with the background HTTP/WebSocket client.
All reactions