Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/license-robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ async function licensePage_login(page, username, password, authenticatorKey) {
page.waitForNavigation({ waitUntil: 'networkidle0' })
]);

const verifyCodeInput = await page.$('#conversations_tfa_required_form_verify_code');
const verifyCodeInputPromise = page.$('#conversations_tfa_required_form_verify_code');
const licenseFileInputPromise = page.$('#licenseFile');

const verifyCodeInput = await verifyCodeInputPromise.catch(() => null);
const licenseFileInput = await licenseFileInputPromise.catch(() => null);

if (verifyCodeInput) {
console.log("License robot. Passing two-factor authentication...");
if (!authenticatorKey) {
Expand All @@ -68,6 +73,10 @@ async function licensePage_login(page, username, password, authenticatorKey) {
page.waitForNavigation({ waitUntil: 'networkidle0' })
]);
}
if (licenseFileInput) {
console.log("License robot. Skip two-factor authentication");
}

}

/**
Expand Down