π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Show dialog when passkey verification response is processed
Neeraj Gupta860ca9852b50
diff --git a/auth/lib/services/user_service.dart b/auth/lib/services/user_service.dartindex 9294680598..a0829cfa1e 100644--- a/auth/lib/services/user_service.dart+++ b/auth/lib/services/user_service.dart@@ -267,31 +267,41 @@ class UserService {}Future<void> onPassKeyVerified(BuildContext context, Map response) async {- final userPassword = Configuration.instance.getVolatilePassword();- if (userPassword == null) throw Exception("volatile password is null");+ final ProgressDialog dialog =+ createProgressDialog(context, context.l10n.pleaseWait);+ await dialog.show();+ try {+ final userPassword = Configuration.instance.getVolatilePassword();+ if (userPassword == null) throw Exception("volatile password is null");- await _saveConfiguration(response);+ await _saveConfiguration(response);- Widget page;- if (Configuration.instance.getEncryptedToken() != null) {- await Configuration.instance.decryptSecretsAndGetKeyEncKey(- userPassword,- Configuration.instance.getKeyAttributes()!,+ Widget page;+ if (Configuration.instance.getEncryptedToken() != null) {+ await Configuration.instance.decryptSecretsAndGetKeyEncKey(+ userPassword,+ Configuration.instance.getKeyAttributes()!,+ );+ page = const HomePage();+ } else {+ throw Exception("unexpected response during passkey verification");+ }+ await dialog.hide();++ // ignore: unawaited_futures+ Navigator.of(context).pushAndRemoveUntil(+ MaterialPageRoute(+ builder: (BuildContext context) {+ return page;+ },+ ),+ (route) => route.isFirst,);- page = const HomePage();- } else {- throw Exception("unexpected response during passkey verification");+ } catch (e) {+ _logger.severe(e);+ await dialog.hide();+ rethrow;}-- // ignore: unawaited_futures- Navigator.of(context).pushAndRemoveUntil(- MaterialPageRoute(- builder: (BuildContext context) {- return page;- },- ),- (route) => route.isFirst,- );}Future<void> verifyEmail(