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
fix: add localhost HTTP server fallback for OAuth callback on Linux
On Linux desktop environments (e.g., xfce4, some Wayland compositors),
the vscode:// custom URI scheme does not work, preventing the OAuth
callback from reaching the extension after browser authentication.
This adds a LocalAuthServer that starts a temporary HTTP server on
127.0.0.1 with a random port to receive the OAuth callback directly,
bypassing the need for custom URI scheme support.
The server automatically shuts down after receiving the callback or
on timeout (5 minutes). If the local server fails to start, it falls
back to the original vscode:// URI scheme.
Closes#12122
@@ -251,6 +253,12 @@ export class WebAuthService extends EventEmitter<AuthServiceEvents> implements A
251
253
* This method initiates the authentication flow by generating a state parameter
252
254
* and opening the browser to the authorization URL.
253
255
*
256
+
* It starts a local HTTP server on 127.0.0.1 as the auth_redirect target.
257
+
* This avoids reliance on the vscode:// URI scheme, which doesn't work on
258
+
* many Linux desktop environments (e.g., xfce4, some Wayland compositors).
259
+
* The vscode:// URI handler is still registered as a parallel mechanism --
260
+
* whichever fires first (local server or URI handler) completes the auth.
261
+
*
254
262
* @param landingPageSlug Optional slug of a specific landing page (e.g., "supernova", "special-offer", etc.)
255
263
* @param useProviderSignup If true, uses provider signup flow (/extension/provider-sign-up). If false, uses standard sign-in (/extension/sign-in). Defaults to false.
256
264
*/
@@ -265,12 +273,32 @@ export class WebAuthService extends EventEmitter<AuthServiceEvents> implements A
265
273
// Generate a cryptographically random state parameter.
0 commit comments