Expand description
m4a-agent element-open (--as <nick>|--session <id>) --element <url>: open an Element Web in
the browser, logged in as this identity, with no password.
The command signs a fresh challenge with the identity key at the product door, receives a
one-time, short-lived Matrix login token (m.login.token), and hands Element the page
<element>/?loginToken=<token> through the browser opener. The token is never printed and never
written to a file; the identity’s own session is untouched. The opener is the command named by
M4A_BROWSER (the URL is its only argument), else xdg-open (open on macOS).
Element must be configured for this server (its default_server_config or default_hs_url).
The login gives that device access to the account’s rooms; the history of encrypted rooms stays
unreadable on a new device unless the owner brings keys over (key backup, or verification from a
device that has them).
The one place the token can be seen is the opener’s argument list for the moment the browser starts, by processes of the same user; it expires in two minutes and works once.