fix: after auth, re-navigate to clean meeting URL with auth cookies instead of waiting on anon=true page
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d3f8457c42
commit
8321a7d3c5
1 changed files with 14 additions and 11 deletions
|
|
@ -216,20 +216,23 @@ export class BotOrchestrator {
|
|||
if (authSuccess) {
|
||||
this._logger.info('Authentication via "Sign in" link succeeded');
|
||||
|
||||
// After the hybrid login flow, Teams goes through a redirect chain.
|
||||
// It may briefly visit /v2/ then land back on light-meetings (now authenticated).
|
||||
// We just need to wait for the redirects to settle and for the page to stabilize.
|
||||
// The Join button (#prejoin-join-button) will appear once the page is ready.
|
||||
this._logger.info('Auth complete. Waiting for redirects to settle and Join button to appear...');
|
||||
// Auth cookies are now set. The current page is still on light-meetings
|
||||
// with anon=true — which keeps showing the anonymous experience regardless
|
||||
// of auth cookies. We need to start fresh: navigate to the ORIGINAL meeting
|
||||
// URL (without anon=true). With auth cookies set, Teams will route to the
|
||||
// authenticated experience (no name input, account name shown).
|
||||
this._logger.info('Auth complete. Re-navigating to meeting URL with auth cookies...');
|
||||
|
||||
// Wait for the redirect chain to finish (URL stops changing)
|
||||
await this._page!.waitForTimeout(5000);
|
||||
// Navigate to the clean meeting URL — Teams will go through launcher again
|
||||
// but this time with auth cookies, so "Continue on this browser" should
|
||||
// lead to the authenticated pre-join page.
|
||||
await this._joinProcedure!.startMeetingLauncherFlow(this._meetingUrl);
|
||||
|
||||
// Wait for the page to settle after the new navigation
|
||||
await this._page!.waitForTimeout(3000);
|
||||
|
||||
const settledUrl = this._page!.url();
|
||||
this._logger.info(`Post-auth settled URL: ${settledUrl.substring(0, 100)}`);
|
||||
|
||||
// The authenticated join flow will be handled by joinMeetingLobbyFlow() below,
|
||||
// which will find the "Join now" button and click it.
|
||||
this._logger.info(`Post-auth re-navigation URL: ${settledUrl.substring(0, 100)}`);
|
||||
} else {
|
||||
this._logger.warn('Authentication via "Sign in" failed - continuing as anonymous');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue