feat(base): SimpleLogin's sign-in comes back by the app's scheme or the loopback (ADR 0020, D9 corrected)

simpleLogin.begin takes the way back (SimpleLoginReturn: loopback,
scheme) rather than the platform, so macOS can come back through its
scheme as iOS and Android do; the markers become learn-loopback,
learn-scheme, todo-loopback and todo-scheme. Not breaking: the
endpoint has never been released.

D9 corrected by the developer after research: Android, iOS and macOS
come back through the app's scheme, Linux and Windows through the
loopback. Verified links protected nothing here: a code caught on its
way is worthless without the attempt's ID, and a hostile app beginning
an attempt of its own can ask for a way back that other platforms need
open. The ADR notes the residual risk and the check of prompt=consent
still to do. assetlinks.json stays served.

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-23 23:35:46 +02:00
commit 7ea9f16904
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -26,16 +26,17 @@
}
# SimpleLogin's forwarding page (ADR 0020): where SimpleLogin sends a sign-in back,
# which sends it on to the app that began it, on the desktop or a phone.
# which sends it on to the app that began it, by the loopback or its scheme.
@simplelogin path /simplelogin-callback
handle @simplelogin {
reverse_proxy server:8082
}
# Android's statement that Halkyon Learn, signed with the project's key
# (tool/release/android-certificate.sha256), opens learn.halkyon.eu's links
# itself (App Links, ADR 0020's D9), so SimpleLogin's way back reaches the app
# without the forwarding page. On learn.halkyon.eu alone, the one instance the
# (tool/release/android-certificate.sha256), may open learn.halkyon.eu's links
# itself (App Links): built for ADR 0020's D9, whose correction brings the
# sign-in back through the app's scheme instead, and kept, as it costs
# nothing. On learn.halkyon.eu alone, the one instance the
# project's builds name: another operator's domain is no link of the project's
# app. Written here rather than by the server, which knows no app's key.
@assetlinks {