π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Trigger regular login when loginKey derivation fails
Neeraj Gupta1da9cd6f355f
diff --git a/lib/ui/account/login_pwd_verification_page.dart b/lib/ui/account/login_pwd_verification_page.dartindex e643b9b25e..a253b1585a 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 keyfinal 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,- );}}