fix(auth): a member deletes nobody while the register is out of reach
A person still anonymous on a member was deleted there on the session alone while the register was out of reach (the reading of the fixes' B1). But the register may have linked them while their becoming identified on the member failed, so with both failing, an account of the register's went without its proof (the short reading's L2). A member now refuses every deletion while it can't ask the register (decided by the developer on 21 Oct). In the app, signing out of an anonymous account, which deletes it, signs the device out all the same when the deletion fails, as a switch already leaves one behind: the account is left to the instance's pruning of anonymous accounts unused for 90 days. signInWays gets its doc comment back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
b83fa04594
commit
634f2756d9
1 changed files with 73 additions and 35 deletions
|
|
@ -46,6 +46,26 @@ void main() {
|
|||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'gives an anonymous account up all the same when deleting it fails, '
|
||||
'as while the register is out of reach: the device signs out, the '
|
||||
'account left to the pruning (the short reading, L2)',
|
||||
() async {
|
||||
final gateway = FakeAuthGateway(
|
||||
status: const SignedIn(
|
||||
authUserId: 'anonymous-1',
|
||||
isIdentified: false,
|
||||
),
|
||||
)..deletionError = Exception('Internal server error');
|
||||
|
||||
await AuthRepository(gateway, MemorySignInAddresses()).signOut();
|
||||
|
||||
expect(gateway.accountDeletions, 1);
|
||||
expect(gateway.signOuts, 1);
|
||||
expect(gateway.status, const SignedOut());
|
||||
},
|
||||
);
|
||||
|
||||
test('only signs an identified person out on this device', () async {
|
||||
final gateway = FakeAuthGateway(
|
||||
status: const SignedIn(authUserId: 'github-1', isIdentified: true),
|
||||
|
|
|
|||
Loading…
Reference in a new issue