feat(base,app)!: GitHub signs nobody in any more (ADR 0020, D36)

Every account signs in with SimpleLogin or a password now, so GitHub
goes from the module, the shared app package, Learn and Todo, ahead of
ADR 0017's GITHUB_SIGN_IN_ENDS.

- halkyon_base: no `gitHubSignIn` endpoint, GitHub identity provider or
  GitHub refusals; no `githubClientId`/`githubClientSecret`, no
  `GITHUB_SIGN_IN_ENDS` and no `forgetGitHubAccounts`; the register
  loses `account-with-github`. `SignInWays.gitHub`, the basics'
  `gitHubClientId` and `gitHubSignInEnds`, and `PasswordRefusal`'s
  `signInAgain` and `noAddress` go. A first password takes a code
  mailed to the person's own address; an account without one sets none
  (`wrongCredentials`).
- Learn's server: `instance.info()` without `gitHubClientId`, the
  pruning without GitHub, and `minimumAppBuild` 24, as builds up to 23
  (v0.20.0) require `SignInWays.gitHub`: the server deploys with the
  release of build 24.
- halkyon_app: no GitHub button or problems on the start screen, no
  password offered after a GitHub sign-in, and `ServerpodAuthGateway`
  without the browser half only GitHub used (`(client, base:)`). The
  account section offers a first password only to an account with an
  address. `LoopbackWebAuth` and the apps' schemes stay, SimpleLogin's
  ways back.
- Learn's Profile lists no GitHub; the texts go (English, German).
- Serverpod's `serverpod_auth_idp_github_account` stays, as its
  migrations make it; a row goes with its account, and ADR 0020's D36
  gives operators the SQL to delete those left.
- deploy/: compose.yaml and .env.example without GitHub. The READMEs,
  AGENTS.md files and ADR 0017 amended.

BREAKING CHANGE: builds up to 23 can't read the instance's answers
about an account's ways in; minimumAppBuild is 24.

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-25 12:52:52 +01:00
commit 4e33133733
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -80,7 +80,11 @@ void main() {
expect(find.text('Continue with SimpleLogin'), findsOneWidget);
expect(find.text('Sign in'), findsOneWidget);
expect(find.text('Create an account'), findsOneWidget);
expect(find.text('Sign in with GitHub'), findsOneWidget);
expect(
find.textContaining('GitHub'),
findsNothing,
reason: 'GitHub signs nobody in any more (ADR 0020, D36)',
);
expect(find.text('Start without an account'), findsNothing);
expect(
find.text('Use another instance'),
@ -105,73 +109,10 @@ void main() {
expect(gateway.accountDeletions, 1);
});
testWidgets('from there, GitHub signs in its person; a GitHub account '
'nobody here has is said so, with SimpleLogin to create one in its '
'place', (tester) async {
signedOut();
await start(tester);
gateway.gitHubError = const GitHubSignInFailed(
GitHubSignInProblem.unknownAccount,
);
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
expect(
find.text(
'No account here signs in with this GitHub account. Continue with '
'SimpleLogin to create one instead.',
),
findsOneWidget,
);
gateway.gitHubError = null;
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
// A password is offered first (ADR 0017, D2), while the sign-in is
// recent enough to set one; put off, the person's app.
expect(find.text('Set up a password'), findsWidgets);
await tester.tap(find.text('Later'));
await tester.pumpAndSettle();
expect(find.text('App of github-person'), findsOneWidget);
});
testWidgets('where the instance offers passwords and no SimpleLogin, the '
'account to create in its place has a password (ADR 0017)', (
testWidgets('an instance with no way to create an account says so', (
tester,
) async {
signedOut();
dependencies.simpleLoginGateway.isOffered = false;
await start(tester);
gateway.gitHubError = const GitHubSignInFailed(
GitHubSignInProblem.unknownAccount,
);
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
expect(
find.text(
'No account here signs in with this GitHub account. Create an '
'account with your email address and a password instead.',
),
findsOneWidget,
);
});
testWidgets('after GitHub, offers no password to someone who has one, or '
'where the instance offers none', (tester) async {
signedOut();
dependencies.passwordGateway.offered = false;
await start(tester);
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
expect(find.text('Later'), findsNothing);
expect(find.text('App of github-person'), findsOneWidget);
});
testWidgets('an instance with no way to create an account says so, and '
'GitHub signs in only those who have it', (tester) async {
signedOut();
dependencies.passwordGateway.offered = false;
dependencies.simpleLoginGateway.isOffered = false;
await start(tester);
@ -182,54 +123,15 @@ void main() {
);
expect(find.text('Continue with SimpleLogin'), findsNothing);
expect(find.text('Create an account'), findsNothing);
gateway.gitHubError = const GitHubSignInFailed(
GitHubSignInProblem.unknownAccount,
);
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
expect(
find.text('No account here signs in with this GitHub account.'),
findsOneWidget,
);
});
testWidgets('an account that signs in with its password, and GitHub having '
'ended, are each said so', (tester) async {
signedOut();
await start(tester);
gateway.gitHubError = const GitHubSignInFailed(
GitHubSignInProblem.usePassword,
);
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
expect(
find.text(
'This account signs in with its email address and password now, '
'not with GitHub.',
),
findsOneWidget,
);
gateway.gitHubError = const GitHubSignInFailed(GitHubSignInProblem.ended);
await tester.tap(find.text('Sign in with GitHub'));
await tester.pumpAndSettle();
expect(
find.text('Sign-in with GitHub has ended on this instance.'),
findsOneWidget,
);
expect(find.text("Couldn't sign in with GitHub."), findsNothing);
});
testWidgets('offers only the ways the instance has', (tester) async {
signedOut();
gateway.offersGitHub = false;
dependencies.passwordGateway.offered = false;
await start(tester);
expect(find.text('Continue with SimpleLogin'), findsOneWidget);
expect(find.text('Sign in with GitHub'), findsNothing);
expect(find.text('Sign in'), findsNothing);
expect(find.text('Create an account'), findsNothing);
expect(find.textContaining('offers no way'), findsNothing);
});
@ -243,14 +145,12 @@ void main() {
dependencies.simpleLoginGateway.failing = const SimpleLoginFailed(
SimpleLoginProblem.failed,
);
gateway.offersGitHubError = Exception('No connection');
await start(tester);
expect(find.text("Couldn't reach the server."), findsOneWidget);
expect(find.text('Continue with SimpleLogin'), findsNothing);
expect(find.textContaining('offers no way'), findsNothing);
gateway.offersGitHubError = null;
dependencies.passwordGateway.failing = null;
dependencies.simpleLoginGateway.failing = null;
await tester.tap(find.text('Try again'));
@ -271,12 +171,10 @@ void main() {
await tester.pumpAndSettle();
expect(find.text('Start on test.example.org:'), findsOneWidget);
gateway.gitHubError = null;
await tester.tap(find.text('Sign in with GitHub'));
// Signed in anew, as a sign-in's session put in place does it.
await gateway.useSession(const SessionGrant('ada', 'session-2'));
await tester.pumpAndSettle();
await tester.tap(find.text('Later'));
await tester.pumpAndSettle();
expect(find.text('App of github-person'), findsOneWidget);
expect(find.text('App of ada'), findsOneWidget);
gateway.revokeSession();
await tester.pumpAndSettle();
expect(find.text('Start on test.example.org:'), findsOneWidget);