You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ddd0e69
Browse filesBrowse the repository at this point in the historyBrowse files
A pop-up opened from a chain that begins in a webview is the first thing a strict browser (Safari, a
phone) refuses. The editor now takes its own tab to the account site's sign-in and the sign-in
returns to the same tab:
- host.openAuth: in the browser the extension asks the page to navigate (levelcode.web.openAuthUrl,
an embedder command) with the address the editor's own opener would have used; without the command
it opens as before. The desktop is untouched.
- web/main.js registers the command. It only goes to the account site's /ai/ pages: any extension in
the page can call it, and it must not be an open redirect.
- callback.html returns the tab to the editor when this tab left it (a sessionStorage mark), and
otherwise says to close the tab and offers a link in.
- At start-up the editor delivers a result the sign-in left in localStorage (a callback.html result
written in the last two minutes: the one-time code lives for one), and ?signin=1 — the account
site's "Open in browser" — starts the sign-in once and removes itself from the address.
Tests: unit (host.openAuth; main.js's leaveForSignIn, drain and start-up, mutation-checked) and an
end-to-end in headless Chrome (web/test/e2e-signin-tab.mjs): no second window, the verifier survives
the reload, no repeat, no sign-in for a signed-in editor, a result waiting for a gone editor is
delivered and an old one is dropped.
0 commit comments