You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Due to an authentication problem, we were unable to change your password. Probably it has been too long since you last signed in. Please sign out and then sign in again with your previous password and try again when you have enough time to complete the operation within 10 minutes.');
358
+
} onKeeNotFoundException {
359
+
l.i('Unable to change password due to 404 response.');
360
+
throwVaultPasswordChangeException('We cannot find your account. Have you recently deleted it?');
361
+
} onKeeServiceTransportExceptioncatch (e) {
362
+
l.w('Unable to change password due to a transport error. Cannot be sure if the request was successful or not. Details: $e');
363
+
throwVaultPasswordChangeException(
364
+
'Due to a network failure, we cannot say whether your request succeeded or not. If possible, try signing in to a different device with your new password to find out if the change took effect. If unsure if it worked, sign in with your previous password next time and try again when you have a more stable network connection.');
final newUser =awaitUser.fromEmail(newEmailAddress);
383
+
emit(AccountChosen(newUser));
384
+
awaitsignout();
385
+
returntrue;
386
+
} onKeeLoginFailedMITMException {
387
+
rethrow;
388
+
} onKeeLoginRequiredException {
389
+
l.w('Unable to changeEmailAddress due to a 403.');
390
+
emit(AccountEmailChangeRequested(user,
391
+
'Due to an authentication problem, we were unable to change your email address. Probably it has been too long since you last signed in with your previous email address. Please click Cancel and then sign in again with your previous email address and try this email change again when you have enough time to complete the operation within 10 minutes.'));
392
+
} onFormatException {
393
+
// Local validation
394
+
l.i('Unable to changeEmailAddress due to FormatException.');
395
+
emit(AccountEmailChangeRequested(user, 'Please enter the correct password for your Kee Vault account.'));
396
+
} onKeeInvalidRequestException {
397
+
// Local validation should mean this is unlikely to happen outside of malicious acts
398
+
l.i('Unable to changeEmailAddress due to 400 response.');
399
+
emit(AccountEmailChangeRequested(user,
400
+
'Please double check that you have entered the correct password for your Kee Vault account. Also check that you have entered a valid email address of no more than 70 characters.'));
401
+
} onKeeServerConflictException {
402
+
l.i('Unable to changeEmailAddress due to 409 response.');
403
+
emit(AccountEmailChangeRequested(user,
404
+
'Sorry, that email address is already associated with a different Kee Vault account (or is reserved due to earlier use by a deleted account). Try signing in to that account, and consider importing your exported KDBX file from this account if you wish to transfer your data to the other account. If you have access to the requested email address but are unable to remember your password, you could use the account reset feature to delete the contents of the other account and assign it a new password that you will remember.'));
405
+
} onKeeNotFoundException {
406
+
l.i('Unable to changeEmailAddress due to 404 response.');
407
+
emit(AccountEmailChangeRequested(user, 'We cannot find your account. Have you recently deleted it?'));
408
+
} onKeeServiceTransportExceptioncatch (e) {
409
+
l.w('Unable to changeEmailAddress due to a transport error. Cannot be sure if the request was successful or not. Details: $e');
410
+
emit(AccountEmailChangeRequested(user,
411
+
'Due to a network failure, we cannot say whether your request succeeded or not. Please check your new email address for a verification request. It might take a moment to arrive but if it does, that suggests the process did work so just verify your new address, click Cancel below and then sign-in using the new email address. If unsure if it worked, sign in with your previous email address next time and try again when you have a more stable network connection.'));
412
+
}
413
+
returnfalse;
414
+
}
415
+
328
416
Future<void> signout() async {
329
417
finalAccountState currentState = state;
330
418
if (currentState isAccountChosen&& (currentState.user.email?.isNotEmpty ??false)) {
0 commit comments