fix(api): follow the live view to the 2FA page during connect sign-in - #3516
Merged
Conversation
The connect flow only re-pointed the live view before the sign-in (after finding the form). Once the AI submitted and the vendor showed a 2FA prompt, the iframe stayed on the pre-submit login tab — so a user asked to enter their 2FA code was looking at an empty login form and couldn't. Re-emit the live view right after the sign-in attempt, at the same tab the classifier judged, so the take-over happens on the page the user actually sees. +test.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The connect session was created without a timeout, so it used the project's short default and Browserbase auto-ended it (~2 min) — killing the live view while a user was still fetching their authenticator / entering a 2FA code (the 'Debugging connection was closed' notice). Give human-facing sessions an explicit 15-minute timeout; headless capture runs keep the short default. +tests.
Contributor
|
🎉 This PR is included in version 3.110.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the connect flow's 2FA take-over actually usable. Two related fixes:
1. The live view didn't follow to the 2FA page
After the AI signs in and the vendor shows a 2FA prompt, the panel says "Your turn — enter the code", but the iframe stayed on the pre-submit login tab (empty fields).
streamActiveLiveViewwas called before the sign-in but never again after it, so the iframe never followed to where the 2FA field is. Fix: re-emit the live view right aftersignInAndClassify, at the same tab the classifier judged.2. The session died after ~2 min ("Debugging connection was closed")
The connect session was created without a
timeout, so it used the project's short default and Browserbase auto-ended it (~2 min) — killing the live view while the user was still fetching their authenticator / typing the code. Fix: give human-facing sessions an explicit 15-minute timeout; headless capture runs keep the short default (no human waiting).Verification
needs_2fapath; session timeout forwarded only for interactive sessions.Note
Backend fixes (emit the right live-view URL + keep the session alive). Worth a quick confirm on stage that the iframe visibly follows to the 2FA page and stays connected through a slow take-over — Browserbase can't be reproduced locally.