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) {
|
if (authSuccess) {
|
||||||
this._logger.info('Authentication via "Sign in" link succeeded');
|
this._logger.info('Authentication via "Sign in" link succeeded');
|
||||||
|
|
||||||
// After the hybrid login flow, Teams goes through a redirect chain.
|
// Auth cookies are now set. The current page is still on light-meetings
|
||||||
// It may briefly visit /v2/ then land back on light-meetings (now authenticated).
|
// with anon=true — which keeps showing the anonymous experience regardless
|
||||||
// We just need to wait for the redirects to settle and for the page to stabilize.
|
// of auth cookies. We need to start fresh: navigate to the ORIGINAL meeting
|
||||||
// The Join button (#prejoin-join-button) will appear once the page is ready.
|
// URL (without anon=true). With auth cookies set, Teams will route to the
|
||||||
this._logger.info('Auth complete. Waiting for redirects to settle and Join button to appear...');
|
// 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)
|
// Navigate to the clean meeting URL — Teams will go through launcher again
|
||||||
await this._page!.waitForTimeout(5000);
|
// 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();
|
const settledUrl = this._page!.url();
|
||||||
this._logger.info(`Post-auth settled URL: ${settledUrl.substring(0, 100)}`);
|
this._logger.info(`Post-auth re-navigation 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.
|
|
||||||
} else {
|
} else {
|
||||||
this._logger.warn('Authentication via "Sign in" failed - continuing as anonymous');
|
this._logger.warn('Authentication via "Sign in" failed - continuing as anonymous');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue