diff --git a/frontend/electron/main.ts b/frontend/electron/main.ts index fed6c7f..d343d1d 100644 --- a/frontend/electron/main.ts +++ b/frontend/electron/main.ts @@ -528,6 +528,12 @@ ipcMain.handle('open-steam-login', async (event, expectedSteamId: string) => { const partitionId = expectedSteamId ? `persist:steam-login-${expectedSteamId}` : 'persist:steam-login-new'; const loginSession = session.fromPartition(partitionId); + // If adding a brand new account, explicitly clear previous trash + if (!expectedSteamId) { + console.log('[Auth] Clearing session for new account login...'); + await loginSession.clearStorageData({ storages: ['cookies', 'localstorage', 'indexdb'] }); + } + // If we have an existing cookie string for this account, pre-inject it if (expectedSteamId) { const accounts = store.get('accounts') as Account[];