feat(app): signing in with SimpleLogin, its sheet and the start screen's offer (ADR 0020)
All checks were successful
CI / check (push) Successful in 31m49s
CI / deploy (push) Has been skipped

Where the instance offers SimpleLogin, the start screen offers it first,
saying that the instance keeps only the SimpleLogin ID, and opens a sheet
that waits for SimpleLogin's page in the browser (Cancel ends the wait),
then: for someone new, the choice between creating an account (the
suggested handle or another, checked with the instance, the password
twice, the recovery phrase shown once and three of its words typed back,
nothing reaching the instance before) and linking theirs again with its
handle and recovery phrase; for an account, its password opening its
keys; for an account of before, the keys made with the handle it lacks.
SimpleLoginCubit holds the steps, each refusal shown where it is mended
(a handle's on the handle, a sign-in to begin again on the browser's),
and closing the sheet stops waiting on the loopback.

The suggested handle is never checked: the instance suggests none that
anybody has, and every answer about a handle counts against its limit
(D5). The fake's handle rule is now the module's.

Learn and Todo build it with SimpleLogin's browser (halkyon_oidc_flutter,
now a direct dependency of both, with their names on the loopback's
page), their schemes and their loopback ports (43823, 43824), as the
instance's forwarding page has them. Their tests offer no SimpleLogin;
halkyon_app's test the sheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-24 01:21:29 +02:00
commit 3a93dc4fd8
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -128,6 +128,26 @@ Written as the apps are: Dart 3.13's primary constructors, Material from
real cryptography to the register's own checks. Anonymous people get no
keys until something is encrypted (step 4). Every build of an app needs a C
compiler and make: sodium's build hook compiles libsodium.
- **Signing in with SimpleLogin** (`lib/src/simplelogin/`, ADR 0020):
`SimpleLoginRepository` on a `SimpleLoginGateway` (`ServerpodSimpleLoginGateway`,
halkyon_base's `simpleLogin` endpoint) and halkyon_oidc_flutter's
`OidcBrowser`: SimpleLogin's page in the system's browser sheet, back by
the app's scheme, or on Linux and Windows in the browser, back to the
app's port on the loopback, as the instance's forwarding page names them
(`callbackScheme`, `loopbackPort`: Learn's 43823, Todo's 43824). Someone
new creates an account (a handle, the one the instance suggests being
free; the password twice, which makes the account's keys on the device;
the recovery phrase shown once and three of its words typed back; nothing
reaches the instance before) or links theirs again in place of a lost
SimpleLogin account with its handle and recovery phrase, which open the
keys on the device before any proof is sent; an account opens its keys
with its password; an account of before gets its keys, and its handle
where it has none. With `link`, SimpleLogin joins the account of the
device's person instead, an anonymous person's device keys kept (no
screen offers it yet). The screens: the start screen's Continue with
SimpleLogin, first where the instance offers it, and
`showSimpleLoginSheet` (`SimpleLoginCubit`), which waits for the browser
with Cancel and stops waiting on the loopback once it closes.
- **Files** (`FileSaver`, `PlatformFileSaver`): keeping a file the app made
where the person chooses (a recovery phrase, recovery codes, an app's
exports): on Linux and macOS the own user's alone (`writePrivately`). On