add: auto-open Proton's verification page in the gui's browser #154
Loading…
Reference in a new issue
No description provided.
Delete branch "captcha-auto-open"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Proton gates every aqomui login behind a CAPTCHA (#150). After #146 the token rides the retry automatically — and that full solve→retry→import cycle is already verified live — but the human still has to fish the verification URL out of the log tab and retype their credentials afterwards.
Fix
Option 1 from the issue, plus the retry: a dedicated signal chain for the URL. The provider emits
verification_needed(url)on the import thread, the service forwards it as a newhuman_verification_neededD-Bus signal, and the gui opens the page withQDesktopServices.openUrl— the user's real browser, in their session.The failed payload gained an optional 4th field naming the kind of failure. A
verificationfailure presents as an Information dialog (it's an expected step, not an error): "A verification page just opened in your browser / Solve it, then continue" with Close / Continue buttons. Continue re-fires the stored import, so the solved token rides a fresh attempt with no retyping — except a 2FA code, which has usually expired by the time the page is solved, so Continue prompts for a fresh one (cancelling the prompt abandons the retry). Clicking Continue before solving is harmless — the retry draws a fresh demand and the same dialog again. A provider guard keeps a scheduled auto-update's demand from re-firing an unrelated stored import.The stored payload holds the account password, so the gui drops it the moment the import flow ends any way but a pending verification (success, hard failure, Close, cancelled 2FA prompt). 3-field payloads behave exactly as before; the cli already tolerates extra fields.
Verification
pytest: 351 passed; CAPTCHA test asserts the emitted URL + 4-field payload; new gui tests cover Continue/Close/unrelated-import/2FA-reprompt/cancelled-prompt and credential dropping.ruff,compileall) clean locally.build-branch-and-install.shround before merge.Why not the QtWebEngine view (option 3)
Checked the claims rather than hand-waving:
qt5-webengineis a 163 MiB installed optdepend, and Qt5's WebEngine is frozen on a Chromium 87-era engine (2020) — a stale engine with a fresh, cookie-less profile is exactly what anti-bot checks score against, so the embedded view is both the heaviest option and the one most likely to fail the CAPTCHA it exists to solve. The real browser wins on every axis. (Revisit only after #155.)🤖 Generated with Claude Code
0401af9b9e20c6bbc1e120c6bbc1e19a0512fe569a0512fe5623ff1adda423ff1adda44cd43739c54cd43739c5add140e3f7