Repository navigation
feat: add login --manual to sign in without a password prompt - #2
Merged
Merged
Conversation
Owner
|
The mechanics check out: PKCE, the state check against the pasted URL, and I'm pushing three small things:
|
trevin-lee
force-pushed
the
pr/manual-login
branch
from
October 10, 2026 08:02
6a7abfd to
22ad028
Compare
…tdin
`prusactl login` asks for the Prusa Account password on the terminal. An
AI agent cannot answer this prompt, and it must not receive the
password.
`login --manual` prints the Prusa Account authorize link on its own
line. It opens a browser unless `--no-open` is given. Then it reads one
line from stdin: the address that the browser shows after approval, or
only its `code=` value. It compares the state in this address with the
state in the link. It exchanges the code for tokens with the same PKCE
flow as the password login.
There is no loopback variant. Prusa Account rejects a `127.0.0.1`
redirect for the Connect client ("Mismatching redirect URI"). The code
must come from the address bar.
If `--manual` is not given and there is no terminal, `login` now tells
the user to use `--manual`. Before, it failed at the password prompt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
…he prompt The README said "no browser involved", which stopped being true the moment --manual opened one. No browser is needed; the password login still works without one. --manual depends on something the README didn't say: Connect's own auth-callback page leaves a code alone when it carries a state the page didn't issue. That is how the page behaves today and nothing promises it will tomorrow, so the note says what breaks if it changes. The prompt said "on one line of stdin", which is the right description for an agent and jargon for a person. It says "paste it here and press Enter" now; the help text keeps the precise version. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
trevin-lee
force-pushed
the
pr/manual-login
branch
from
October 10, 2026 08:13
22ad028 to
ffcb25f
Compare
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.
hi, my clankers found this nice project during research, I liked it so decided to make you aware about the changes I've made for my use cases, so everyone can profit from that, but feel free to close it or implement it differently, happy to help with testing, cheers, Petr
prusactl loginasks for the Prusa Account password on the terminal. An AI agent that drives prusactl cannot answer this prompt, and it must not see the password.login --manualprints the Prusa Account authorize link on its own line. It opens a browser unless--no-openis given. Then it reads one line from stdin: the address that the browser shows after approval, or only itscode=value. prusactl compares the state in this address with the state in the link. It exchanges the code for tokens with the same PKCE flow as the password login.There is no loopback (
127.0.0.1) variant. Prusa Account rejects this redirect for the Connect client with "Mismatching redirect URI". The code must come from the address bar.If
--manualis not given and there is no terminal,loginnow suggests--manual. Before, it failed at the password prompt.Testing