Skip to main content

Module login

Module login 

Source
Expand description

Logins in progress: one driver thread per login, one browser step at a time (start with the phone → a code or the app’s approval → done). The browser polls Logins::get; a login nobody polled for Timing::abandon_ms is cancelled, as is one the person cancels. A login’s id is minted here and bound to the person and the org that started it: another’s is “not found”.

person and org are the embedder’s plain keys: who is logging in (one person may run several logins) and which Grab account it connects (one login at a time per org, and a code-send budget per org).

The phone and the code are never kept: the phone goes straight to the driver thread, the code waits in memory only until the driver takes it, and neither is logged.

Structs§

LoggedIn
What a finished login hands back: the session to keep and the name. Its Debug never shows the session.
Logins
The logins in progress.
Snapshot
A login as its person sees it.
Timing
The clocks and limits (the tests shrink them).

Enums§

LoginError
Why a call was refused.
View
Where a login is.

Type Aliases§

OnDone
Where a done login’s session goes (the embedder keeps it for the org); an error fails the login.