feat(base)!: no anonymous accounts on the server (ADR 0020, D25)
All checks were successful
CI / check (push) Successful in 30m13s
CI / deploy (push) Has been skipped

The server's half of D25: every account has a way in, and the anonymous
accounts left from before go with the daily pruning.

- The module signs nobody in anonymously: `anonymousIdp` and
  `gitHubUpgrade` are gone, and so is linking GitHub at the register.
- A password is set only by someone whose address is theirs (a
  `firstPassword` code) or who signs in with GitHub alone (a fresh
  sign-in and a `signUp` code); an anonymous account is refused
  `wrongCredentials` before any code is used.
- SimpleLogin refuses to link onto a caller without `identified`
  (`wrongCaller`), the member's endpoint too, so nothing turns an
  anonymous account into one with a way in.
- `pruneAnonymousPeople` deletes every anonymous account left, however
  new, never one identified. Learn and Todo schedule it as
  `prune-accounts` and cancel the old `prune-abandoned-anonymous-people`
  entry once.
- Learn: someone without `identified` keeps no files;
  `FILE_LIMIT_ANONYMOUS_MB` is gone. `minimumAppBuild` is 23, as builds
  up to 22 start with an anonymous account.
- Learn's sync tests make their person and session by SQL in the
  development database, as Serverpod stores sessions.
- Docs, store listings and ADRs 0010, 0014, 0016, 0017 and 0019 amended.

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 16:07:27 +02:00
commit 87671208df
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -202,14 +202,10 @@ void withServerpod(
class TestEndpoints {
late final _AccountEndpoint account;
late final _AnonymousIdpEndpoint anonymousIdp;
late final _EmailCodeEndpoint emailCode;
late final _GitHubSignInEndpoint gitHubSignIn;
late final _GitHubUpgradeEndpoint gitHubUpgrade;
late final _InstanceEndpoint instance;
late final _KeysEndpoint keys;
@ -240,10 +236,6 @@ class _InternalTestEndpoints extends TestEndpoints
endpoints,
serializationManager,
);
anonymousIdp = _AnonymousIdpEndpoint(
endpoints,
serializationManager,
);
emailCode = _EmailCodeEndpoint(
endpoints,
serializationManager,
@ -252,10 +244,6 @@ class _InternalTestEndpoints extends TestEndpoints
endpoints,
serializationManager,
);
gitHubUpgrade = _GitHubUpgradeEndpoint(
endpoints,
serializationManager,
);
instance = _InstanceEndpoint(
endpoints,
serializationManager,
@ -371,48 +359,6 @@ class _AccountEndpoint {
}
}
class _AnonymousIdpEndpoint {
_AnonymousIdpEndpoint(
this._endpointDispatch,
this._serializationManager,
);
final _is.EndpointDispatch _endpointDispatch;
final _is.SerializationManager _serializationManager;
_ida.Future<_iacs.AuthSuccess> login(
_ist.TestSessionBuilder sessionBuilder, {
String? token,
}) async {
return _ist.callAwaitableFunctionAndHandleExceptions(() async {
var _localUniqueSession =
(sessionBuilder as _ist.InternalTestSessionBuilder).internalBuild(
endpoint: 'anonymousIdp',
method: 'login',
);
try {
var _localCallContext = await _endpointDispatch.getMethodCallContext(
createSessionCallback: (_) => _localUniqueSession,
endpointPath: 'anonymousIdp',
methodName: 'login',
parameters: _ist.testObjectToJson({'token': token}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iacs.AuthSuccess>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
}
});
}
}
class _EmailCodeEndpoint {
_EmailCodeEndpoint(
this._endpointDispatch,
@ -509,54 +455,6 @@ class _GitHubSignInEndpoint {
}
}
class _GitHubUpgradeEndpoint {
_GitHubUpgradeEndpoint(
this._endpointDispatch,
this._serializationManager,
);
final _is.EndpointDispatch _endpointDispatch;
final _is.SerializationManager _serializationManager;
_ida.Future<void> upgrade(
_ist.TestSessionBuilder sessionBuilder, {
required String code,
required String codeVerifier,
required String redirectUri,
}) async {
return _ist.callAwaitableFunctionAndHandleExceptions(() async {
var _localUniqueSession =
(sessionBuilder as _ist.InternalTestSessionBuilder).internalBuild(
endpoint: 'gitHubUpgrade',
method: 'upgrade',
);
try {
var _localCallContext = await _endpointDispatch.getMethodCallContext(
createSessionCallback: (_) => _localUniqueSession,
endpointPath: 'gitHubUpgrade',
methodName: 'upgrade',
parameters: _ist.testObjectToJson({
'code': code,
'codeVerifier': codeVerifier,
'redirectUri': redirectUri,
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
}
});
}
}
class _InstanceEndpoint {
_InstanceEndpoint(
this._endpointDispatch,