Browse Source

Skip messaging inbox auth-assurance step in booking refresh-creds

ZiB 4 tháng trước cách đây
mục cha
commit
6767d0c171
1 tập tin đã thay đổi với 4 bổ sung và 11 xóa
  1. 4 11
      room_cal/service_api/typescript/booking/refresh-cookies.ts

+ 4 - 11
room_cal/service_api/typescript/booking/refresh-cookies.ts

@@ -137,17 +137,10 @@ export async function refresh(mode: string): Promise<CredentialsPayload> {
 
   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...');
   const all = await context.cookies();