feat(base,train): Train signs in with SimpleLogin, on ways back of its own (ADR 0020)

The forwarding page's table gains train-loopback (port 43825) and
train-scheme (app.halkyon.train://). Train's app had kept Todo's
loopback port 43824 from its shell; it now has its own.

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-29 22:34:02 +01:00
commit 18f456eed9
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
8 changed files with 17 additions and 5 deletions

View file

@ -268,7 +268,7 @@ class TrainDependencies({
// on by (halkyon_base's `simplelogin_callback.dart`): the scheme each // on by (halkyon_base's `simplelogin_callback.dart`): the scheme each
// platform's project registers for the app, and Train's loopback port. // platform's project registers for the app, and Train's loopback port.
callbackScheme: 'app.halkyon.train', callbackScheme: 'app.halkyon.train',
loopbackPort: 43824, loopbackPort: 43825,
); );
final instanceOperators = InstanceOperatorRepository( final instanceOperators = InstanceOperatorRepository(
ServerpodInstanceOperatorGateway(client.modules.base), ServerpodInstanceOperatorGateway(client.modules.base),

View file

@ -135,7 +135,7 @@ void main() {
MemoryAccountKeyStore(), MemoryAccountKeyStore(),
gateway, gateway,
callbackScheme: 'app.halkyon.train', callbackScheme: 'app.halkyon.train',
loopbackPort: 43824, loopbackPort: 43825,
), ),
instanceOperators: InstanceOperatorRepository( instanceOperators: InstanceOperatorRepository(
FakeInstanceOperatorGateway(), FakeInstanceOperatorGateway(),

View file

@ -409,6 +409,14 @@ against app.simplelogin.io on 23 Oct:
``` ```
- **Released with the next changes** (over a release of its own). - **Released with the next changes** (over a release of its own).
- **Halkyon Train (29 Oct 2026):** the forwarding page's table gains Train's ways back,
`train-loopback` on port 43825 and `train-scheme` (`app.halkyon.train://`), so that
Train signs up and in with SimpleLogin as Learn does; Train's app had taken Todo's port
43824 over with its shell, which would have sent a sign-in begun on one to the other on
the same desktop. The page is the register's, so Train signs in with SimpleLogin once
learn.halkyon.eu runs it; a development server of Train's needs the instance's
SimpleLogin app (`simpleLoginClientId`, `simpleLoginClientSecret`) and
`SIMPLELOGIN_CALLBACK_URL` naming learn.halkyon.eu's page.
- **Also (23 Oct):** the developer's own account moves by adding SimpleLogin to it while - **Also (23 Oct):** the developer's own account moves by adding SimpleLogin to it while
signed in with GitHub; the instance's SimpleLogin app goes up for approval once signed in with GitHub; the instance's SimpleLogin app goes up for approval once
halkyon.app/learn exists, before learn.halkyon.eu switches. halkyon.app/learn exists, before learn.halkyon.eu switches.

View file

@ -184,7 +184,7 @@ Written as the apps are: Dart 3.13's primary constructors, Material from
`OidcBrowser`: SimpleLogin's page in the system's browser sheet, back by `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 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 app's port on the loopback, as the instance's forwarding page names them
(`callbackScheme`, `loopbackPort`: Learn's 43823, Todo's 43824). Someone (`callbackScheme`, `loopbackPort`: Learn's 43823, Todo's 43824, Train's 43825). Someone
new creates an account (a handle, the one the instance suggests being 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; 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 the recovery phrase shown once and three of its words typed back; nothing

View file

@ -54,7 +54,7 @@ class SimpleLoginRepository(
/// The app's own port on the loopback, which the browser comes back to on /// The app's own port on the loopback, which the browser comes back to on
/// Linux and Windows, as the instance's forwarding page has it (Learn's /// Linux and Windows, as the instance's forwarding page has it (Learn's
/// 43823, Todo's 43824). /// 43823, Todo's 43824, Train's 43825).
required final int loopbackPort, required final int loopbackPort,
/// The platform the app runs on; tests name one. /// The platform the app runs on; tests name one.

View file

@ -25,6 +25,8 @@ const simpleLoginReturns = {
'learn-scheme': 'app.halkyon.learn://simplelogin-callback', 'learn-scheme': 'app.halkyon.learn://simplelogin-callback',
'todo-loopback': 'http://127.0.0.1:43824/simplelogin-callback', 'todo-loopback': 'http://127.0.0.1:43824/simplelogin-callback',
'todo-scheme': 'app.halkyon.todo://simplelogin-callback', 'todo-scheme': 'app.halkyon.todo://simplelogin-callback',
'train-loopback': 'http://127.0.0.1:43825/simplelogin-callback',
'train-scheme': 'app.halkyon.train://simplelogin-callback',
}; };
final _returns = { final _returns = {

View file

@ -25,6 +25,8 @@ void main() {
'learn-scheme': 'app.halkyon.learn://simplelogin-callback', 'learn-scheme': 'app.halkyon.learn://simplelogin-callback',
'todo-loopback': 'http://127.0.0.1:43824/simplelogin-callback', 'todo-loopback': 'http://127.0.0.1:43824/simplelogin-callback',
'todo-scheme': 'app.halkyon.todo://simplelogin-callback', 'todo-scheme': 'app.halkyon.todo://simplelogin-callback',
'train-loopback': 'http://127.0.0.1:43825/simplelogin-callback',
'train-scheme': 'app.halkyon.train://simplelogin-callback',
}); });
}); });

View file

@ -112,7 +112,7 @@ void main() {
simpleLoginMarker('todo', SimpleLoginReturn.scheme), simpleLoginMarker('todo', SimpleLoginReturn.scheme),
'todo-scheme', 'todo-scheme',
); );
for (final app in ['learn', 'todo']) { for (final app in ['learn', 'todo', 'train']) {
for (final back in SimpleLoginReturn.values) { for (final back in SimpleLoginReturn.values) {
expect( expect(
simpleLoginReturns, simpleLoginReturns,