dev #1

Merged
nocci merged 51 commits from dev into main 2026-03-06 16:31:29 +01:00
Showing only changes of commit 1a34d8f0e4 - Show all commits

View file

@ -124,14 +124,14 @@ const ensureLoggedIn = async (page, context) => {
// Epic login form
if (!cfg.eg_email || !cfg.eg_password) return false;
try {
await page.waitForSelector('input[name="email"]', { timeout: cfg.login_visible_timeout }).catch(() => {});
await page.goto('https://www.epicgames.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=' + URL_CLAIM, { waitUntil: 'domcontentloaded' });
const emailField = page.locator('input[name="email"], input#email');
const passwordField = page.locator('input[name="password"], input#password');
// Some flows pre-fill email and show only password field
if (await emailField.count()) await emailField.fill(cfg.eg_email);
if (await passwordField.count()) {
await passwordField.fill(cfg.eg_password);
await page.click('button[type="submit"]');
}
await passwordField.waitFor({ timeout: cfg.login_visible_timeout });
await passwordField.fill(cfg.eg_password);
await page.click('button[type="submit"]');
// MFA step
try {
await page.waitForURL('**/id/login/mfa**', { timeout: cfg.login_timeout });