Skip to content

sign_in: refuse a username that differs from the account the page shows - #341

Merged
MehdiMamas merged 1 commit into
mainfrom
fix/sign-in-username-mismatch
Nov 16, 2026
Merged

MehdiMamas merged 1 commit into
mainfrom
fix/sign-in-username-mismatch

Conversation

@MehdiMamas

Copy link
Copy Markdown
Owner

Part of #339. A session's sign_in on a password-only step filled a saved login whose username did not match the account the page asked for, and the page refused it.

  • content.js: pageUsername also says whether the account is fixed (hidden or read-only input, account chip, address in nearby text). An editable username field is not fixed, since the fill overwrites it.
  • agent.js: with a fixed account, sign_in with no username picks the matching login; a different username, or no saved login for that account, is username_mismatch with the saved usernames, and nothing is filled.
  • Docs: agent-protocol.md, SETUP.md. Tests: 5 unit cases.

Local: typecheck green; unit tests pass except the pre-existing "managed: the options page saves only the changed key" failure (also on main).

…age shows (#339)

A password-only step shows a fixed account (hidden or read-only username,
account chip, or the address near the password field). sign_in now fills
only the saved login for that account: with no username it picks the match,
and a different username or no match is username_mismatch, nothing filled.
@MehdiMamas
MehdiMamas merged commit a3a7fcf into main Nov 16, 2026
5 checks passed
@MehdiMamas
MehdiMamas deleted the fix/sign-in-username-mismatch branch November 16, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant