fix(auth): GitHub-only accounts go at GitHub's end; only the anonymous add an address

The full reading's M1 and L6: once GitHub IDs were forgotten at
GITHUB_SIGN_IN_ENDS, an account that had signed in with GitHub alone
counted as anonymous, so a stolen session and any mailbox gave it a first
password and authenticator; and such accounts, with no way in left, were
never pruned. Now:

- at the end, the daily run that forgets the GitHub IDs first deletes the
  accounts that sign in with GitHub alone (no address, so never a
  password), with everything they have, members told (deletePerson); the
  app tells them for the three months before that their account goes then
  unless they set up a password (passwordSectionGitHubEndsDeletes, en/de);
- password.set adds an address without GitHub only for someone anonymous
  where the session lives (anonymousHere, which a member tells the
  register, as it tells freshGitHubSignIn); anyone else is refused before
  any code is used.

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-21 13:23:40 +02:00
commit 5eb74639b6
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -152,8 +152,9 @@ abstract interface class AccountRegister {
/// Gives [person] the password [setup] describes, with the address [code]
/// proves for [request] (their own where they have one), and for one who
/// signs in with GitHub alone a GitHub sign-in of theirs made recently
/// ([freshGitHubSignIn], of the session asking). Refusals as
/// `setPassword`'s.
/// ([freshGitHubSignIn], of the session asking); someone with neither
/// only while anonymous where the session lives ([anonymousHere]).
/// Refusals as `setPassword`'s.
Future<void> setPassword(
Session session, {
required UuidValue person,
@ -161,6 +162,7 @@ abstract interface class AccountRegister {
UuidValue? request,
String? code,
bool freshGitHubSignIn = false,
bool anonymousHere = false,
});
/// A password sign-in's first step for [address], the sign-ins begun from