From 96b64166b18e9920dfb32a5dc8295324dded2049 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Thu, 25 Jun 2026 04:37:03 +0530 Subject: [PATCH] refactor(ipc): remove showDashboardAfterAuth function and its invocation after OAuth token retrieval --- surfsense_desktop/src/ipc/handlers.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/surfsense_desktop/src/ipc/handlers.ts b/surfsense_desktop/src/ipc/handlers.ts index bc2bdcc20..ab4ba0d92 100644 --- a/surfsense_desktop/src/ipc/handlers.ts +++ b/surfsense_desktop/src/ipc/handlers.ts @@ -54,7 +54,6 @@ import { import { installDownloadedUpdate } from '../modules/auto-updater'; import { secretStore } from '../modules/secret-store'; import { startGoogleOAuth } from '../modules/oauth'; -import { createMainWindow, getMainWindow } from '../modules/window'; const REFRESH_TOKEN_KEY = 'surfsense_refresh_token'; let accessToken: string | null = null; @@ -86,16 +85,6 @@ async function storeTokens(tokens: { bearer: string; refresh?: string | null }): broadcastAuthChanged(); } -function showDashboardAfterAuth(): void { - const win = getMainWindow(); - if (!win || win.isDestroyed()) { - createMainWindow('/dashboard'); - return; - } - win.show(); - win.focus(); -} - async function refreshAccessToken(): Promise { if (refreshInFlight) return refreshInFlight; @@ -277,7 +266,6 @@ export function registerIpcHandlers(): void { } const tokens = await startGoogleOAuth(backendUrl); await storeTokens({ bearer: tokens.access_token, refresh: tokens.refresh_token }); - showDashboardAfterAuth(); return { ok: true }; });