Accounts on the web: sign-in, the code step, invites, first-run setup, and
the Account and People APIs, under the base path the routes answer at (the
SDK's accounts/web.ts). Runlight.routes(rl, accounts: true) makes one.
Summary
Functions
What a signed-in person may do: everything (owner and admin), "member", "read" (viewer), or nothing.
The account a request comes from, or nil.
Answers an account page or API request at a path under the base, or nil for anything else.
Whether there is any account yet.
Accounts on the web. Options: runlight, secret (signs sessions and seals
two-factor secrets; keep it stable across restarts), base, now,
first_account (who may create the first account: {:code, code},
{:token, token}, :open, or :locked), home (a function answering the
install's public address, or nil), and forgot (where the sign-in page
sends someone who forgot their password).
A random one-time code, such as the one a server prints to unlock its first account.
The signed-in account for a request, or nil.
Notes who made a token. False when they can no longer make one (a viewer, or gone), which takes it back.
Types
Functions
@spec access(t(), Runlight.Http.Request.t()) :: true | false | String.t()
What a signed-in person may do: everything (owner and admin), "member", "read" (viewer), or nothing.
The account a request comes from, or nil.
@spec handle(t(), Runlight.Http.Request.t(), String.t()) :: Runlight.Http.Response.t() | nil
Answers an account page or API request at a path under the base, or nil for anything else.
Whether there is any account yet.
Accounts on the web. Options: runlight, secret (signs sessions and seals
two-factor secrets; keep it stable across restarts), base, now,
first_account (who may create the first account: {:code, code},
{:token, token}, :open, or :locked), home (a function answering the
install's public address, or nil), and forgot (where the sign-in page
sends someone who forgot their password).
A random one-time code, such as the one a server prints to unlock its first account.
The signed-in account for a request, or nil.
Notes who made a token. False when they can no longer make one (a viewer, or gone), which takes it back.