@thetypefounders/continue-with-google 1.2.0 → 1.2.1
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/dist/index.js +2 -5
- package/package.json +1 -1
- package/src/index.ts +2 -4
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ export async function authenticate(page, email, password, secret, selector, opti
|
|
|
19
19
|
await page.keyboard.press('Enter');
|
|
20
20
|
for (let attempt = 0, found = false; attempt < (options.challengeCount || DEFAULTS.challengeCount) && !found; attempt++) {
|
|
21
21
|
if (attempt > 0) {
|
|
22
|
-
logger.
|
|
22
|
+
logger.warn(`Challenged on attempt ${attempt}. Entering the code...`);
|
|
23
23
|
if (attempt > 1) {
|
|
24
24
|
await setTimeout(1000 *
|
|
25
25
|
(options.challengeTimeoutSeconds ||
|
|
@@ -46,7 +46,7 @@ export async function authenticate(page, email, password, secret, selector, opti
|
|
|
46
46
|
async function waitForTrial(page, attemptCount, attemptTimeoutSeconds, logger) {
|
|
47
47
|
for (let attempt = -1, previous = undefined, current = undefined; attempt < attemptCount && (current === undefined || previous !== current); attempt++) {
|
|
48
48
|
if (attempt > 0) {
|
|
49
|
-
logger.
|
|
49
|
+
logger.warn(`Tried on attempt ${attempt}. Waiting to finish...`);
|
|
50
50
|
}
|
|
51
51
|
if (attempt > -1) {
|
|
52
52
|
await setTimeout(1000 * attemptTimeoutSeconds);
|
|
@@ -56,9 +56,6 @@ async function waitForTrial(page, attemptCount, attemptTimeoutSeconds, logger) {
|
|
|
56
56
|
previous = current;
|
|
57
57
|
current = future;
|
|
58
58
|
}
|
|
59
|
-
else {
|
|
60
|
-
logger.warn(`Failed to take a screenshot.`);
|
|
61
|
-
}
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
61
|
async function screenshot(page) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -49,7 +49,7 @@ export async function authenticate(
|
|
|
49
49
|
attempt++
|
|
50
50
|
) {
|
|
51
51
|
if (attempt > 0) {
|
|
52
|
-
logger.
|
|
52
|
+
logger.warn(`Challenged on attempt ${attempt}. Entering the code...`);
|
|
53
53
|
if (attempt > 1) {
|
|
54
54
|
await setTimeout(
|
|
55
55
|
1000 *
|
|
@@ -94,7 +94,7 @@ async function waitForTrial(
|
|
|
94
94
|
attempt++
|
|
95
95
|
) {
|
|
96
96
|
if (attempt > 0) {
|
|
97
|
-
logger.
|
|
97
|
+
logger.warn(`Tried on attempt ${attempt}. Waiting to finish...`);
|
|
98
98
|
}
|
|
99
99
|
if (attempt > -1) {
|
|
100
100
|
await setTimeout(1000 * attemptTimeoutSeconds);
|
|
@@ -103,8 +103,6 @@ async function waitForTrial(
|
|
|
103
103
|
if (future) {
|
|
104
104
|
previous = current;
|
|
105
105
|
current = future;
|
|
106
|
-
} else {
|
|
107
|
-
logger.warn(`Failed to take a screenshot.`);
|
|
108
106
|
}
|
|
109
107
|
}
|
|
110
108
|
}
|