Repository navigation
Explain password sign-in refused by reCAPTCHA and offer browser sign-in - #71
Merged
Merged
Conversation
overleaf.com requires a captcha for password sign-in and answers a login form post without a captcha token with HTTP 400 and a JSON body whose errorReason is "cannot_verify_user_not_robot", before the credentials are checked. olcli reported this only as "Password login failed (HTTP 400)". fromPasswordLogin now throws CaptchaRequiredError (exported) when the response carries that errorReason, or, when the response gives no reason of its own, when the login page has reCAPTCHA switched on for login (recaptchaDisabled.login false in ol-ExposedSettings, or the reCAPTCHA script or widget on releases without that setting). The message names olcli auth --browser and olcli auth --cookie. formatError prints it for the CLI, the MCP server and the git remote helper. Wrong-password failures keep their existing messages. An interactive olcli auth --email (TTY on stdin and stdout, not CI) asks whether to sign in in the browser instead and runs the auth --browser flow on yes; when no supported browser or WebSocket is available it prints the reason instead of asking. Scripts and all other entry points only get the message. olcli auth status warns when password credentials would be used on overleaf.com and lists the warning in a new warnings array in --json output. Help texts, README, docs and SKILL.md now say that password sign-in works only on self-hosted servers without reCAPTCHA.
ora computes the lines to clear per frame by dividing by the stream's column count. A pseudo-terminal opened without a window size reports 0 columns, so the count became Infinity and every frame printed cursor-up and clear codes without end; olcli auth never finished. createSpinner now treats such a terminal like a pipe: no animation and the plain ok:/error: words. Verified against overleaf.com over a pty with a window size: the captcha message, the browser sign-in question and exit 1 on n.
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.
overleaf.com requires a captcha for password sign-in. A login form post without a captcha token gets HTTP 400 with {"errorReason":"cannot_verify_user_not_robot", ...}, before the credentials are checked. olcli reported only "Password login failed (HTTP 400)".