@ubaidbinwaris/linkedin 1.0.7 → 1.0.8
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/login/login.js +4 -10
package/package.json
CHANGED
package/src/login/login.js
CHANGED
|
@@ -159,14 +159,6 @@ async function loginToLinkedIn(options = {}, credentials = null) {
|
|
|
159
159
|
if (options.onCheckpoint && typeof options.onCheckpoint === 'function') {
|
|
160
160
|
logger.info("Triggering onCheckpoint callback...");
|
|
161
161
|
await options.onCheckpoint();
|
|
162
|
-
// We assume the callback resolves when the user has taken action (e.g. solved via visible browser)
|
|
163
|
-
// But here we need to know what to do next.
|
|
164
|
-
// If the user solved it in a *different* browser/session, we might need to reload.
|
|
165
|
-
// For now, let's assume the callback handles the visible switch logic we implemented before,
|
|
166
|
-
// OR validates externally.
|
|
167
|
-
// However, to keep it simple and compatible with our previous logic:
|
|
168
|
-
// If onCheckpoint is provided, we await it, then close this browser and retry (assuming session saved).
|
|
169
|
-
|
|
170
162
|
logger.info("onCheckpoint resolved. Retrying login...");
|
|
171
163
|
await browser.close();
|
|
172
164
|
return loginToLinkedIn(options, credentials);
|
|
@@ -174,7 +166,8 @@ async function loginToLinkedIn(options = {}, credentials = null) {
|
|
|
174
166
|
|
|
175
167
|
logger.info("Switching to visible mode for manual verification...");
|
|
176
168
|
|
|
177
|
-
await waitForUserResume("Press ENTER to open a visible browser to verify your account...");
|
|
169
|
+
// await waitForUserResume("Press ENTER to open a visible browser to verify your account...");
|
|
170
|
+
logger.info("Automatically launching visible browser for verification...");
|
|
178
171
|
|
|
179
172
|
logger.info("Closing headless browser...");
|
|
180
173
|
await browser.close();
|
|
@@ -282,7 +275,8 @@ async function loginToLinkedIn(options = {}, credentials = null) {
|
|
|
282
275
|
|
|
283
276
|
logger.info("Switching to visible mode for manual verification...");
|
|
284
277
|
|
|
285
|
-
await waitForUserResume("Press ENTER to open a visible browser to verify your account...");
|
|
278
|
+
// await waitForUserResume("Press ENTER to open a visible browser to verify your account...");
|
|
279
|
+
logger.info("Automatically launching visible browser for verification...");
|
|
286
280
|
|
|
287
281
|
logger.info("Closing headless browser...");
|
|
288
282
|
await browser.close();
|