fix(auth): every call with a code after the password takes the address

Whoever guessed codes decided whether the owner was mailed (the re-review's
fourth finding): the address a sign-in sent was optional, so a guesser left
it out and no mail went, and a wait begun without a mail used up the one
mail there was. Every call carrying a code after the password or the phrase
proved (signing in, the phrase's reset, a change of password, a new phrase,
deletion) now takes the account's address and the language of its mails,
and is refused (wrongCredentials, as anything wrong after the password)
before any code is checked when the address isn't the account's; every
wait mails the owner, not only the first. The app sends the address the
person typed, or for changes while signed in the one this device signed in
with, and says so where it doesn't know it (addressUnknown).

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-20 23:08:25 +02:00
commit 2a21672b43
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
6 changed files with 795 additions and 347 deletions

View file

@ -99,6 +99,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: totpCode ?? codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
});
@ -122,6 +124,8 @@ void main() {
totpCode: withoutCode ? null : totpCode ?? codeOf(enrolment, at: now),
password: password ?? device.newPassword(),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
});
@ -348,6 +352,8 @@ void main() {
totpCode: codeOf(enrolment, at: now),
password: device.newPassword(),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
}),
refused(PasswordRefusal.challengeExpired),
@ -373,6 +379,45 @@ void main() {
);
});
test("takes the account's address, refused for another before "
'the code is checked; its wrong codes make codes wait, the owner '
'mailed', () async {
await expectLater(
atNow(() async {
final challenge = await endpoints.password.beginChange(
onPhone(),
);
final answer = device.answer(challenge);
await endpoints.password.change(
onPhone(),
challenge: challenge.challenge,
clientValue: answer.clientValue,
clientProof: answer.clientProof,
totpCode: codeOf(enrolment, at: now),
// Another device's: a refused change leaves Anna's as it is.
password: (await PasswordDevice.make()).newPassword(),
host: testHost,
address: 'ben@example.org',
language: 'en',
);
}),
refused(PasswordRefusal.wrongCredentials),
);
expect(await SecondFactorFailures.db.count(session), 0);
// Past the hour of the changes begun (ten an hour per account).
now = now.add(const Duration(hours: 1, seconds: 1));
// Another device's new password: refused changes leave Anna's.
final other = await PasswordDevice.make();
for (var i = 0; i < 10; i++) {
await expectLater(
change(totpCode: '000000', password: other.newPassword()),
refused(PasswordRefusal.wrongCredentials),
);
}
expect(mailbox.codesWait.single.to, 'anna@example.org');
expect(mailbox.codesWait.single.language, 'en');
});
test('is begun only by someone with a password', () async {
final ben = await newAnonymousPerson(session);
final bensLaptop = await signInNewDevice(session, ben);
@ -445,6 +490,8 @@ void main() {
recoveryKeys: recoveryKeys ?? fresh,
recoveryProofKey: recoveryProofKey ?? freshProofKey,
host: testHost,
address: 'anna@example.org',
language: 'en',
);
});
@ -477,6 +524,8 @@ void main() {
password: newPassword,
totpCode: codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
);
return true;
@ -618,6 +667,8 @@ void main() {
? null
: totpCode ?? codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
);
});
@ -695,6 +746,8 @@ void main() {
password: newPassword,
totpCode: codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
);

View file

@ -142,6 +142,8 @@ void main() {
totpCode: totpCode,
recoveryCode: recoveryCode,
host: testHost,
address: address,
language: 'en',
);
});
@ -389,6 +391,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
);
@ -528,6 +532,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
);
@ -555,6 +561,8 @@ void main() {
clientProof: lateAnswer.clientProof,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.challengeExpired),
@ -567,6 +575,8 @@ void main() {
clientValue: lateAnswer.clientValue,
clientProof: lateAnswer.clientProof,
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.challengeExpired),
@ -593,6 +603,8 @@ void main() {
clientProof: ByteData(32),
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.wrongCredentials),
@ -625,6 +637,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
}),
refused(PasswordRefusal.wrongCredentials),
@ -646,6 +660,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: codeOf(complete.enrolment, at: now),
host: 'learn.evil.example',
address: 'anna@example.org',
language: 'en',
);
}),
refused(PasswordRefusal.otherInstance),
@ -727,6 +743,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: '000000',
host: testHost,
address: address,
language: 'en',
),
refused(PasswordRefusal.wrongCredentials),
);
@ -797,7 +815,7 @@ void main() {
);
test('wait an hour after ten, twice as long after ten more, the '
'owner mailed once, at the first; even the right code waits; '
'owner mailed at each; even the right code waits; '
'a code accepted clears it all', () async {
final complete = await annaComplete();
@ -830,7 +848,8 @@ void main() {
),
waitsUntil(now.add(const Duration(hours: 2))),
);
expect(mailbox.codesWait, hasLength(1));
// Every wait mails the owner.
expect(mailbox.codesWait, hasLength(2));
now = now.add(const Duration(hours: 2, seconds: 1));
await tryCode(
@ -841,7 +860,7 @@ void main() {
// Cleared: the next wait is an hour again, and mailed again.
nextStep();
await refuseTen('203.0.113.2');
expect(mailbox.codesWait, hasLength(2));
expect(mailbox.codesWait, hasLength(3));
});
test('sent at once are counted before they are checked: ten '
@ -894,6 +913,39 @@ void main() {
expect(row?.waits, 1);
});
test('take the address the sign-in began with, and refuse '
'without it before the code is checked: whoever guesses '
'decides no mail away', () async {
final complete = await annaComplete();
for (final address in ['ben@example.org', 'not an address']) {
await expectLater(
atNow(() async {
final challenge = await beginPasswordSignIn(
session,
address: 'anna@example.org',
network: '203.0.113.1',
);
final answer = device.answer(challenge);
return await endpoints.passwordSignIn.complete(
notSignedIn(),
challenge: challenge.challenge,
clientValue: answer.clientValue,
clientProof: answer.clientProof,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: address,
language: 'en',
);
}),
refused(PasswordRefusal.wrongCredentials),
);
}
// No code was checked: none counted, and the right code
// still signs in at this step.
expect(await SecondFactorFailures.db.count(session), 0);
await tryCode(totpCode: codeOf(complete.enrolment, at: now));
});
test('wait a day at the most', () {
expect(codeWait(0), const Duration(hours: 1));
expect(codeWait(1), const Duration(hours: 2));
@ -924,6 +976,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: '000000',
host: testHost,
address: 'anna@example.org',
language: 'en',
);
}),
refused(PasswordRefusal.wrongCredentials),
@ -1819,6 +1873,8 @@ void main() {
password: newPassword,
totpCode: totpCode,
host: testHost,
address: address,
language: 'en',
);
});
@ -1961,6 +2017,8 @@ void main() {
signature: signature,
password: newPassword,
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.wrongCredentials),
@ -1974,6 +2032,8 @@ void main() {
password: newPassword,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.challengeExpired),
@ -1994,6 +2054,8 @@ void main() {
password: newPassword,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.challengeExpired),
@ -2064,6 +2126,8 @@ void main() {
password: newPassword,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
});
@ -2228,6 +2292,8 @@ void main() {
password: newPassword,
totpCode: codeOf(complete.enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
),
refused(PasswordRefusal.wrongCredentials),

View file

@ -104,6 +104,8 @@ void main() {
request: mailed?.request,
code: wrongMailedCode ?? mailed?.code,
host: testHost,
address: address,
language: 'en',
);
});

View file

@ -414,6 +414,8 @@ final class _Register implements AccountRegister {
required NewPassword password,
UuidValue? keepSession,
required String host,
required String address,
required String language,
}) => _answer('changePassword', () {
changed[person] = keepSession;
});
@ -430,6 +432,8 @@ final class _Register implements AccountRegister {
required WrappedKeys recoveryKeys,
required ByteData recoveryProofKey,
required String host,
required String address,
required String language,
}) => _answer('setRecoveryKeys', () {});
@override
@ -657,6 +661,8 @@ void main() {
clientProof: ByteData(32),
totpCode: '123456',
host: testHost,
address: 'anna@example.org',
language: 'en',
);
expect(register.asked, [
@ -710,6 +716,8 @@ void main() {
clientValue: ByteData(384),
clientProof: ByteData(32),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
throwsA(
isA<PasswordRefusedException>().having(
@ -848,6 +856,8 @@ void main() {
clientProof: ByteData(32),
totpCode: '123456',
host: 'LOCALHOST',
address: 'anna@example.org',
language: 'en',
),
);
@ -1048,6 +1058,8 @@ void main() {
),
),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
expect(register.asked, ['beginPasswordChange', 'changePassword']);
@ -1085,6 +1097,8 @@ void main() {
),
totpCode: '123456',
host: testHost,
address: 'anna@example.org',
language: 'en',
);
expect(signedIn.authUserId, ben);
@ -1135,6 +1149,8 @@ void main() {
),
totpCode: '123456',
host: testHost,
address: 'anna@example.org',
language: 'en',
),
throwsA(
isA<PasswordRefusedException>().having(

View file

@ -564,6 +564,8 @@ void main() {
clientProof: answer.clientProof,
totpCode: codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
expect(proof.account, annaOnTodo);
expect(answer.verifiesServer(proof.serverProof), isTrue);
@ -582,6 +584,8 @@ void main() {
clientProof: againAnswer.clientProof,
totpCode: codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
refused(PasswordRefusal.wrongCredentials),
);
@ -618,6 +622,8 @@ void main() {
password: newPassword,
totpCode: codeOf(enrolment, at: now),
host: testHost,
address: 'anna@example.org',
language: 'en',
),
(account: annaOnTodo, endedBefore: now),
);
@ -744,6 +750,8 @@ void main() {
password: device.newPassword(),
keepSession: annasPhone,
host: testHost,
address: 'anna@example.org',
language: 'en',
);
expect(members.sessionsTold.single, (
_todo,
@ -775,6 +783,8 @@ void main() {
device.recoveryProofKey,
),
host: testHost,
address: 'anna@example.org',
language: 'en',
);
}
@ -880,6 +890,8 @@ void main() {
request: await code(),
code: mailbox.codeFor('carla@example.org'),
host: testHost,
address: 'carla@example.org',
language: 'en',
);
expect(proof.account, carla);
expect(proof.needsAuthenticator, isTrue);

View file

@ -14,6 +14,7 @@
import 'dart:async' as _ida;
import 'dart:io' as _idi;
import 'dart:typed_data' as _idt;
import 'package:halkyon_base_server/src/generated/auth/sign_in_ways.dart'
as _ik4ah9vo;
import 'package:halkyon_base_server/src/generated/instance/instance_basics.dart'
@ -290,12 +291,10 @@ class _AccountEndpoint {
parameters: _ist.testObjectToJson({'proof': proof}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -320,12 +319,10 @@ class _AccountEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_ik4ah9vo.SignInWays>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_ik4ah9vo.SignInWays>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -362,12 +359,10 @@ class _AnonymousIdpEndpoint {
parameters: _ist.testObjectToJson({'token': token}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iacs.AuthSuccess>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_iacs.AuthSuccess>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -408,12 +403,10 @@ class _EmailCodeEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_is.UuidValue>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_is.UuidValue>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -456,12 +449,10 @@ class _GitHubSignInEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iacs.AuthSuccess>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_iacs.AuthSuccess>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -504,12 +495,10 @@ class _GitHubUpgradeEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -545,12 +534,10 @@ class _InstanceEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_ihusd8tw.InstanceBasics>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_ihusd8tw.InstanceBasics>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -607,12 +594,10 @@ class _AccountRecoveryEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_isakxto6.ResetPending>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_isakxto6.ResetPending>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -638,12 +623,10 @@ class _AccountRecoveryEndpoint {
parameters: _ist.testObjectToJson({'address': address}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iaysae70.KeyProofChallenge>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_iaysae70.KeyProofChallenge>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -659,8 +642,8 @@ class _AccountRecoveryEndpoint {
String? totpCode,
String? recoveryCode,
required String host,
String? address,
String? language,
required String address,
required String language,
}) async {
return _ist.callAwaitableFunctionAndHandleExceptions(() async {
var _localUniqueSession =
@ -685,12 +668,10 @@ class _AccountRecoveryEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iacs.AuthSuccess>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_iacs.AuthSuccess>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -724,12 +705,10 @@ class _AccountRecoveryEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_isakxto6.ResetPending>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_isakxto6.ResetPending>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -763,12 +742,10 @@ class _AccountRecoveryEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iacs.AuthSuccess>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_iacs.AuthSuccess>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -809,12 +786,10 @@ class _AuthenticatorEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_id229ey1.AuthenticatorEnrolment>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_id229ey1.AuthenticatorEnrolment>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -846,12 +821,10 @@ class _AuthenticatorEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<List<String>>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<List<String>>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -876,12 +849,10 @@ class _AuthenticatorEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<List<_ip34xal6.Authenticator>>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<List<_ip34xal6.Authenticator>>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -911,12 +882,10 @@ class _AuthenticatorEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -942,12 +911,10 @@ class _AuthenticatorEndpoint {
parameters: _ist.testObjectToJson({'code': code}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<List<String>>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<List<String>>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -990,12 +957,10 @@ class _PasswordEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1020,12 +985,10 @@ class _PasswordEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_isz0atlx.PasswordChallenge>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_isz0atlx.PasswordChallenge>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1042,6 +1005,8 @@ class _PasswordEndpoint {
String? recoveryCode,
required _ijye8mcv.NewPassword password,
required String host,
required String address,
required String language,
}) async {
return _ist.callAwaitableFunctionAndHandleExceptions(() async {
var _localUniqueSession =
@ -1062,15 +1027,15 @@ class _PasswordEndpoint {
'recoveryCode': recoveryCode,
'password': password,
'host': host,
'address': address,
'language': language,
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1088,6 +1053,8 @@ class _PasswordEndpoint {
required _iji0wmu8.WrappedKeys recoveryKeys,
required _idt.ByteData recoveryProofKey,
required String host,
required String address,
required String language,
}) async {
return _ist.callAwaitableFunctionAndHandleExceptions(() async {
var _localUniqueSession =
@ -1109,15 +1076,15 @@ class _PasswordEndpoint {
'recoveryKeys': recoveryKeys,
'recoveryProofKey': recoveryProofKey,
'host': host,
'address': address,
'language': language,
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1154,12 +1121,10 @@ class _PasswordSignInEndpoint {
parameters: _ist.testObjectToJson({'address': address}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_isz0atlx.PasswordChallenge>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_isz0atlx.PasswordChallenge>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1177,8 +1142,8 @@ class _PasswordSignInEndpoint {
_is.UuidValue? request,
String? code,
required String host,
String? address,
String? language,
required String address,
required String language,
}) async {
return _ist.callAwaitableFunctionAndHandleExceptions(() async {
var _localUniqueSession =
@ -1205,12 +1170,10 @@ class _PasswordSignInEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_ikpyb5fh.PasswordSignedIn>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_ikpyb5fh.PasswordSignedIn>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1242,12 +1205,10 @@ class _PasswordSignInEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_iacs.AuthSuccess>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_iacs.AuthSuccess>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1283,12 +1244,10 @@ class _ProfileEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_it4tom37.Profile?>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_it4tom37.Profile?>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1322,12 +1281,10 @@ class _ProfileEndpoint {
}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_it4tom37.Profile>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_it4tom37.Profile>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1352,12 +1309,10 @@ class _ProfileEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_it4tom37.Profile>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_it4tom37.Profile>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1383,12 +1338,10 @@ class _ProfileEndpoint {
parameters: _ist.testObjectToJson({'handle': handle}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_idszjcpz.ProfileRefusal?>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_idszjcpz.ProfileRefusal?>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1414,12 +1367,10 @@ class _ProfileEndpoint {
parameters: _ist.testObjectToJson({'png': png}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_it4tom37.Profile>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_it4tom37.Profile>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1444,12 +1395,10 @@ class _ProfileEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_it4tom37.Profile>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_it4tom37.Profile>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1472,12 +1421,10 @@ class _ProfileEndpoint {
parameters: _ist.testObjectToJson({}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<void>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<void>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();
@ -1514,12 +1461,10 @@ class _ProfilesEndpoint {
parameters: _ist.testObjectToJson({'handle': handle}),
serializationManager: _serializationManager,
);
var _localReturnValue =
await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
)
as _ida.Future<_it4tom37.Profile>);
var _localReturnValue = await (_localCallContext.method.call(
_localUniqueSession,
_localCallContext.arguments,
) as _ida.Future<_it4tom37.Profile>);
return _localReturnValue;
} finally {
await _localUniqueSession.close();