@lightcone-ai/daemon 0.9.42 → 0.9.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/browser-login.js +3 -9
package/package.json
CHANGED
package/src/browser-login.js
CHANGED
|
@@ -111,17 +111,11 @@ export class BrowserLoginSession {
|
|
|
111
111
|
async start(connection, userId) {
|
|
112
112
|
this._profileDir = profileDir(this._platform, userId);
|
|
113
113
|
|
|
114
|
-
//
|
|
114
|
+
// Wipe the profile dir before each login so stale cookies can't fool the login check.
|
|
115
|
+
// This is safe — these dirs are single-platform dedicated profiles; fresh start is correct.
|
|
116
|
+
try { if (existsSync(this._profileDir)) rmSync(this._profileDir, { recursive: true, force: true }); } catch {}
|
|
115
117
|
try { mkdirSync(this._profileDir, { recursive: true }); } catch {}
|
|
116
118
|
|
|
117
|
-
// Delete the Cookies file before Chrome starts so stale session cookies can't fool the login check
|
|
118
|
-
for (const cookiePath of [
|
|
119
|
-
path.join(this._profileDir, 'Default', 'Cookies'),
|
|
120
|
-
path.join(this._profileDir, 'Cookies'),
|
|
121
|
-
]) {
|
|
122
|
-
try { if (existsSync(cookiePath)) rmSync(cookiePath, { force: true }); } catch {}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
119
|
// Kill any process holding the CDP port
|
|
126
120
|
try {
|
|
127
121
|
if (process.platform !== 'win32') {
|