|
@@ -137,17 +137,10 @@ export async function refresh(mode: string): Promise<CredentialsPayload> {
|
|
|
|
|
|
|
|
const session = new URL(page.url()).searchParams.get('ses') ?? ses;
|
|
const session = new URL(page.url()).searchParams.get('ses') ?? ses;
|
|
|
|
|
|
|
|
- // Navigate to the messaging inbox to trigger and complete auth-assurance for chat access.
|
|
|
|
|
- // This is a separate 2FA gate from the general session; without it, messaging GraphQL calls fail.
|
|
|
|
|
- const inboxUrl = `https://${ADMIN_BASE}/hotel/hoteladmin/extranet_ng/manage/messaging/inbox.html?hotel_id=${hotelId}&lang=en&ses=${session}&source=nav&tlc=1`;
|
|
|
|
|
- console.error('Navigating to messaging inbox to prime auth-assurance...');
|
|
|
|
|
- await page.goto(inboxUrl);
|
|
|
|
|
- await page.waitForLoadState('domcontentloaded');
|
|
|
|
|
- if (page.url().includes('auth-assurance')) {
|
|
|
|
|
- await handleAuthAssurance(page, smsMasked);
|
|
|
|
|
- await page.waitForURL(`**${ADMIN_BASE}**`, { timeout: 120_000 });
|
|
|
|
|
- }
|
|
|
|
|
- console.error('Messaging inbox reached.');
|
|
|
|
|
|
|
+ // TODO: Navigate to messaging inbox to prime auth-assurance for chat access.
|
|
|
|
|
+ // This is a separate 2FA gate; without it, messaging GraphQL calls may fail on a cold session.
|
|
|
|
|
+ // Skipped for now because the SMS 2FA prompt slows down unattended credential refreshes.
|
|
|
|
|
+ // Re-enable once we have a reliable way to handle or suppress the auth-assurance challenge.
|
|
|
|
|
|
|
|
console.error('Capturing cookies...');
|
|
console.error('Capturing cookies...');
|
|
|
const all = await context.cookies();
|
|
const all = await context.cookies();
|