Expand description
identity.signin.* (spec §4.4, D6): signing in an account on this machine for an agent
somewhere else. The provider’s own login runs here, under an account directory srv mints; the
caller gets the link and the session, and later the account’s id and email, and never a token
or a path. The caller shows the link where the person is reading, and the credentials stay on
this machine. A session belongs to the caller that started it, as the transport proved it
(slug@machine): another caller can’t read it or finish it.
Structs§
- Login 🔒
- A provider this op can sign in. Its login command is a frontend catalog entry, so the ones whose command is known here are listed. A person who signs in on another machine can’t be sent back to a callback on this one, so a provider whose browser flow ends in one (codex) uses the device code flow instead: a link and a one-time code, nothing to hand back.
- Session
Params 🔒 - Start
Params 🔒
Constants§
- DEFAULT_
PROVIDER 🔒 - FINISH_
WAIT 🔒 - LINK_
WAIT 🔒 - How long
startwaits for the CLI to print its link, andfinishfor the sign-in to end. - LOGINS 🔒
- MAX_
OWNED 🔒 - Sessions this machine remembers a caller for; the oldest go first.
- POLL_
EVERY 🔒
Statics§
- OWNERS 🔒
- Who started each session (and in which session manager), so only that caller reads or finishes it.
Functions§
- bad 🔒
- failed 🔒
- finish 🔒
- Wait for the sign-in to end: the login finishes on its own once the person has authorized in a
browser, or takes the code they were shown (
code) when the browser can’t finish it. - login_
for 🔒 - manager_
key 🔒 - Identifies the session manager that holds a session: one per srv.
- notice 🔒
- Show a sign-in link as a notice here, because the person is on this machine:
routeon the machine of the agent that asked sends it to the one that has a window focused. - owned_
by 🔒 - poll_
until 🔒 - Poll until
donesays stop orwaitpasses; the last status seen. - remember 🔒
- start 🔒
- Start signing in an account on this machine, and give back the link for the person.
- view 🔒
- The session’s state as the caller sees it. An account’s id and email appear once it is signed in.