@lightcone-ai/daemon 0.9.41 → 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 -4
package/package.json
CHANGED
package/src/browser-login.js
CHANGED
|
@@ -111,7 +111,9 @@ 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
119
|
// Kill any process holding the CDP port
|
|
@@ -177,9 +179,6 @@ export class BrowserLoginSession {
|
|
|
177
179
|
source: `Object.defineProperty(navigator, 'webdriver', { get: () => undefined });`,
|
|
178
180
|
});
|
|
179
181
|
|
|
180
|
-
// Clear the session cookie so we only detect a *fresh* login, not stale cached cookies
|
|
181
|
-
await this._clearSessionCookies();
|
|
182
|
-
|
|
183
182
|
await this.send('Page.navigate', { url: this._config.loginUrl });
|
|
184
183
|
|
|
185
184
|
this._startPolling(connection);
|