diff --git a/lib/ui/account/login_pwd_verification_page.dart b/lib/ui/account/login_pwd_verification_page.dart index e643b9b25..a253b1585 100644 --- a/lib/ui/account/login_pwd_verification_page.dart +++ b/lib/ui/account/login_pwd_verification_page.dart @@ -139,9 +139,19 @@ class _LoginPasswordVerificationPageState } } } catch (e, s) { - _logger.severe('error while verifying password', e, s); + _logger.info('error during loginViaPassword', e); await dialog.hide(); - if (e is KeyDerivationError || e is LoginKeyDerivationError) { + if (e is LoginKeyDerivationError) { + _logger.severe('loginKey derivation error', e, s); + // LoginKey err, perform regular login via ott verification + await UserService.instance.sendOtt( + context, + email!, + isCreateAccountScreen: true, + ); + return; + } else if (e is KeyDerivationError) { + // device is not powerful enough to perform derive key final dialogChoice = await showChoiceDialog( context, title: S.of(context).recreatePasswordTitle, @@ -156,12 +166,14 @@ class _LoginPasswordVerificationPageState ); } return; + } else { + _logger.severe('unexpected error while verifying password', e, s); + await _showContactSupportDialog( + context, + S.of(context).oops, + S.of(context).verificationFailedPleaseTryAgain, + ); } - await _showContactSupportDialog( - context, - S.of(context).oops, - S.of(context).verificationFailedPleaseTryAgain, - ); } }